diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2008-12-07 16:00:08 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2008-12-07 16:00:08 +0000 |
commit | 937ea0ca28ed1018caad86ddd1942cd54d6f962e (patch) | |
tree | 7d4cf7f6b291ccc8b4757a66f95ecede9aa44eb8 /usr.sbin/smtpd | |
parent | bc27dada7ca1e8da033b735359e3f23417596861 (diff) |
Simplify queue_record_incoming_envelope.
ok gilles@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/queue.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.sbin/smtpd/queue.c b/usr.sbin/smtpd/queue.c index 5aff098f0fd..a8c3641ce58 100644 --- a/usr.sbin/smtpd/queue.c +++ b/usr.sbin/smtpd/queue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: queue.c,v 1.21 2008/12/06 23:49:40 jacekm Exp $ */ +/* $OpenBSD: queue.c,v 1.22 2008/12/07 16:00:07 jacekm Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -848,7 +848,6 @@ delroot: int queue_record_incoming_envelope(struct message *message) { - char rootdir[MAXPATHLEN]; char evpdir[MAXPATHLEN]; char evpname[MAXPATHLEN]; char message_uid[MAXPATHLEN]; @@ -858,12 +857,8 @@ queue_record_incoming_envelope(struct message *message) FILE *fp; int ret; - spret = snprintf(rootdir, MAXPATHLEN, "%s/%s", PATH_INCOMING, - message->message_id); - if (spret == -1 || spret >= MAXPATHLEN) - fatal("queue_record_incoming_envelope: snprintf"); - - spret = snprintf(evpdir, MAXPATHLEN, "%s%s", rootdir, PATH_ENVELOPES); + spret = snprintf(evpdir, MAXPATHLEN, "%s/%s%s", PATH_INCOMING, + message->message_id, PATH_ENVELOPES); if (spret == -1 || spret >= MAXPATHLEN) fatal("queue_record_incoming_envelope: snprintf"); |