From 937ea0ca28ed1018caad86ddd1942cd54d6f962e Mon Sep 17 00:00:00 2001 From: Jacek Masiulaniec Date: Sun, 7 Dec 2008 16:00:08 +0000 Subject: Simplify queue_record_incoming_envelope. ok gilles@ --- usr.sbin/smtpd/queue.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'usr.sbin/smtpd/queue.c') 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 @@ -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"); -- cgit v1.2.3