diff options
author | Oleg Safiullin <form@cvs.openbsd.org> | 2009-02-22 11:44:30 +0000 |
---|---|---|
committer | Oleg Safiullin <form@cvs.openbsd.org> | 2009-02-22 11:44:30 +0000 |
commit | 84aafbcbd7d4bfbe59924ecc5b635ddee9b7d49e (patch) | |
tree | e5b2f3ca1a8c1df9d9459f39ed8eaab8a13ddad0 /usr.sbin/smtpd/parse.y | |
parent | daea31b785b4497a3bb956c142810504edb37eb0 (diff) |
replace MAX* constants by sizeof where possible
ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd/parse.y')
-rw-r--r-- | usr.sbin/smtpd/parse.y | 17 |
1 files changed, 11 insertions, 6 deletions
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 <gilles@openbsd.org> @@ -482,7 +482,8 @@ mapref : STRING { free(m); YYERROR; } - if (! bsnprintf(m->m_name, MAX_LINE_SIZE, "<dynamic(%u)>", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "<dynamic(%u)>", 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, "<dynamic(%u)>", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "<dynamic(%u)>", 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, "<dynamic(%u)>", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "<dynamic(%u)>", 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, "<dynamic(%u)>", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "<dynamic(%u)>", 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, "<dynamic(%u)>", m->m_id)) + if (! bsnprintf(m->m_name, sizeof(m->m_name), + "<dynamic(%u)>", m->m_id)) fatal("snprintf"); m->m_flags |= F_DYNAMIC|F_USED; m->m_type = T_SINGLE; |