summaryrefslogtreecommitdiff
path: root/usr.bin/newsyslog
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.bin/newsyslog
parentb75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (diff)
mkstemp() returns -1 on failure
Diffstat (limited to 'usr.bin/newsyslog')
-rw-r--r--usr.bin/newsyslog/newsyslog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/newsyslog/newsyslog.c b/usr.bin/newsyslog/newsyslog.c
index 46b21d67d53..e0d6be77903 100644
--- a/usr.bin/newsyslog/newsyslog.c
+++ b/usr.bin/newsyslog/newsyslog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newsyslog.c,v 1.110 2019/01/25 00:19:26 millert Exp $ */
+/* $OpenBSD: newsyslog.c,v 1.111 2019/06/28 05:35:34 deraadt Exp $ */
/*
* Copyright (c) 1999, 2002, 2003 Todd C. Miller <millert@openbsd.org>
@@ -850,7 +850,7 @@ dotrim(struct conf_entry *ent)
if (noaction) {
printf("\tmktemp %s\n", file2);
} else {
- if ((fd = mkstemp(file2)) < 0)
+ if ((fd = mkstemp(file2)) == -1)
err(1, "can't start '%s' log", file2);
if (fchmod(fd, ent->permissions))
err(1, "can't chmod '%s' log file", file2);