diff options
author | Eric Faurot <eric@cvs.openbsd.org> | 2012-01-13 22:01:24 +0000 |
---|---|---|
committer | Eric Faurot <eric@cvs.openbsd.org> | 2012-01-13 22:01:24 +0000 |
commit | ca1aceab1999ba735225ce97f3005200f509f02d (patch) | |
tree | 3fd33fe542c2cbbd5b0348183d8140b80dd0e85b /usr.sbin | |
parent | bcf47ad6c577c247b8c7b03bf0bd52a7a49edb70 (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.c | 7 |
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)); |