From 84aafbcbd7d4bfbe59924ecc5b635ddee9b7d49e Mon Sep 17 00:00:00 2001 From: Oleg Safiullin Date: Sun, 22 Feb 2009 11:44:30 +0000 Subject: replace MAX* constants by sizeof where possible ok jacekm@ --- usr.sbin/smtpd/parse.y | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'usr.sbin/smtpd/parse.y') diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index 4c7df45705b..e738e7cc95a 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.24 2009/01/30 10:09:58 form Exp $ */ +/* $OpenBSD: parse.y,v 1.25 2009/02/22 11:44:29 form Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -482,7 +482,8 @@ mapref : STRING { free(m); YYERROR; } - if (! bsnprintf(m->m_name, MAX_LINE_SIZE, "", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "", m->m_id)) fatal("snprintf"); m->m_flags |= F_DYNAMIC|F_USED; m->m_type = T_SINGLE; @@ -555,7 +556,8 @@ mapref : STRING { free(m); YYERROR; } - if (! bsnprintf(m->m_name, MAX_LINE_SIZE, "", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "", m->m_id)) fatal("snprintf"); m->m_flags |= F_DYNAMIC|F_USED; m->m_type = T_LIST; @@ -580,7 +582,8 @@ mapref : STRING { free(m); YYERROR; } - if (! bsnprintf(m->m_name, MAX_LINE_SIZE, "", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "", m->m_id)) fatal("snprintf"); m->m_flags |= F_DYNAMIC|F_USED; m->m_type = T_HASH; @@ -717,7 +720,8 @@ from : FROM mapref { free(m); YYERROR; } - if (! bsnprintf(m->m_name, MAX_LINE_SIZE, "", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "", m->m_id)) fatal("snprintf"); m->m_flags |= F_DYNAMIC|F_USED; m->m_type = T_SINGLE; @@ -765,7 +769,8 @@ from : FROM mapref { free(m); YYERROR; } - if (! bsnprintf(m->m_name, MAX_LINE_SIZE, "", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "", m->m_id)) fatal("snprintf"); m->m_flags |= F_DYNAMIC|F_USED; m->m_type = T_SINGLE; -- cgit v1.2.3