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/m4 | |
parent | b75b34ab97c5e2b3d1cc4fae079092b6d7d399a3 (diff) |
mkstemp() returns -1 on failure
Diffstat (limited to 'usr.bin/m4')
-rw-r--r-- | usr.bin/m4/eval.c | 4 |
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); |