summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-28 05:35:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-28 05:35:36 +0000
commitdb251f9c53ebe82df0e02b3d742581fd8b421989 (patch)
tree2483bb2028ba9c0fe193188d9d466ea52a607aaa /usr.sbin/smtpd
parentb75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (diff)
mkstemp() returns -1 on failure
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/smtpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/smtpd.c b/usr.sbin/smtpd/smtpd.c
index 02fcbde52e7..4409aa16d28 100644
--- a/usr.sbin/smtpd/smtpd.c
+++ b/usr.sbin/smtpd/smtpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: smtpd.c,v 1.321 2019/06/27 05:14:49 martijn Exp $ */
+/* $OpenBSD: smtpd.c,v 1.322 2019/06/28 05:35:35 deraadt Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -1435,7 +1435,7 @@ forkmda(struct mproc *p, uint64_t id, struct deliver *deliver)
/* prepare file which captures stdout and stderr */
(void)strlcpy(sfn, "/tmp/smtpd.out.XXXXXXXXXXX", sizeof(sfn));
allout = mkstemp(sfn);
- if (allout < 0) {
+ if (allout == -1) {
(void)snprintf(ebuf, sizeof ebuf, "mkstemp: %s", strerror(errno));
m_create(p_pony, IMSG_MDA_DONE, 0, 0, -1);
m_add_id(p_pony, id);