summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2012-01-13 22:01:24 +0000
committerEric Faurot <eric@cvs.openbsd.org>2012-01-13 22:01:24 +0000
commitca1aceab1999ba735225ce97f3005200f509f02d (patch)
tree3fd33fe542c2cbbd5b0348183d8140b80dd0e85b /usr.sbin
parentbcf47ad6c577c247b8c7b03bf0bd52a7a49edb70 (diff)
use a simpler way to get to the parent directory
ok gilles@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/queue_fsqueue.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/smtpd/queue_fsqueue.c b/usr.sbin/smtpd/queue_fsqueue.c
index 3732b05ba8f..0cccb078f11 100644
--- a/usr.sbin/smtpd/queue_fsqueue.c
+++ b/usr.sbin/smtpd/queue_fsqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: queue_fsqueue.c,v 1.29 2012/01/13 21:58:35 eric Exp $ */
+/* $OpenBSD: queue_fsqueue.c,v 1.30 2012/01/13 22:01:23 eric Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@openbsd.org>
@@ -234,10 +234,7 @@ fsqueue_envelope_delete(enum queue_kind qkind, struct envelope *ep)
fatal("fsqueue_envelope_delete: unlink");
}
- if (! bsnprintf(pathname, sizeof(pathname), "%s/%03x/%08x%s", PATH_QUEUE,
- evpid_to_msgid(ep->id) & 0xfff,
- evpid_to_msgid(ep->id), PATH_ENVELOPES))
- fatal("fsqueue_envelope_delete: snprintf");
+ *strrchr(pathname, '/') = '\0';
if (rmdir(pathname) != -1)
fsqueue_message_delete(qkind, evpid_to_msgid(ep->id));