diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 05:35:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2019-06-28 05:35:36 +0000 |
commit | db251f9c53ebe82df0e02b3d742581fd8b421989 (patch) | |
tree | 2483bb2028ba9c0fe193188d9d466ea52a607aaa /usr.bin/newsyslog | |
parent | b75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (diff) |
mkstemp() returns -1 on failure
Diffstat (limited to 'usr.bin/newsyslog')
-rw-r--r-- | usr.bin/newsyslog/newsyslog.c | 4 |
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); |