summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/runner.c
diff options
context:
space:
mode:
authorOleg Safiullin <form@cvs.openbsd.org>2009-02-22 11:44:30 +0000
committerOleg Safiullin <form@cvs.openbsd.org>2009-02-22 11:44:30 +0000
commit84aafbcbd7d4bfbe59924ecc5b635ddee9b7d49e (patch)
treee5b2f3ca1a8c1df9d9459f39ed8eaab8a13ddad0 /usr.sbin/smtpd/runner.c
parentdaea31b785b4497a3bb956c142810504edb37eb0 (diff)
replace MAX* constants by sizeof where possible
ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd/runner.c')
-rw-r--r--usr.sbin/smtpd/runner.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/runner.c b/usr.sbin/smtpd/runner.c
index e0b41d86c21..a4a24110aa8 100644
--- a/usr.sbin/smtpd/runner.c
+++ b/usr.sbin/smtpd/runner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: runner.c,v 1.30 2009/02/15 10:32:23 jacekm Exp $ */
+/* $OpenBSD: runner.c,v 1.31 2009/02/22 11:44:29 form Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -781,13 +781,14 @@ runner_purge_message(char *msgid)
DIR *dirp;
struct dirent *dp;
- if (! bsnprintf(rootdir, MAXPATHLEN, "%s/%s", PATH_PURGE, msgid))
+ if (! bsnprintf(rootdir, sizeof(rootdir), "%s/%s", PATH_PURGE, msgid))
fatal("queue_delete_incoming_message: snprintf");
- if (! bsnprintf(evpdir, MAXPATHLEN, "%s%s", rootdir, PATH_ENVELOPES))
+ if (! bsnprintf(evpdir, sizeof(evpdir), "%s%s", rootdir,
+ PATH_ENVELOPES))
fatal("queue_delete_incoming_message: snprintf");
- if (! bsnprintf(msgpath, MAXPATHLEN, "%s/message", rootdir))
+ if (! bsnprintf(msgpath, sizeof(msgpath), "%s/message", rootdir))
fatal("queue_delete_incoming_message: snprintf");
if (unlink(msgpath) == -1)
@@ -804,7 +805,7 @@ runner_purge_message(char *msgid)
if (strcmp(dp->d_name, ".") == 0 ||
strcmp(dp->d_name, "..") == 0)
continue;
- if (! bsnprintf(evppath, MAXPATHLEN, "%s/%s", evpdir,
+ if (! bsnprintf(evppath, sizeof(evppath), "%s/%s", evpdir,
dp->d_name))
fatal("queue_delete_incoming_message: snprintf");