summaryrefslogtreecommitdiff
path: root/usr.bin/m4
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/m4
parentb75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (diff)
mkstemp() returns -1 on failure
Diffstat (limited to 'usr.bin/m4')
-rw-r--r--usr.bin/m4/eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c
index bbaf23c697b..d226505cab3 100644
--- a/usr.bin/m4/eval.c
+++ b/usr.bin/m4/eval.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eval.c,v 1.77 2017/11/11 12:55:59 espie Exp $ */
+/* $OpenBSD: eval.c,v 1.78 2019/06/28 05:35:34 deraadt Exp $ */
/* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */
/*
@@ -839,7 +839,7 @@ dodiv(int n)
if (outfile[n] == NULL) {
char fname[] = _PATH_DIVNAME;
- if ((fd = mkstemp(fname)) < 0 ||
+ if ((fd = mkstemp(fname)) == -1 ||
unlink(fname) == -1 ||
(outfile[n] = fdopen(fd, "w+")) == NULL)
err(1, "%s: cannot divert", fname);