aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/m4
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2019-09-09 15:37:40 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2019-09-09 15:37:40 +0000
commitc57596e1ae0f20220b10a854dc23969908505b86 (patch)
treebf38f66dcca7fe5be58a7d3f1d20ded36ea666b7 /usr.bin/m4
parentdb531a5d1893673c1aa6ca196e184cafddb5c5f7 (diff)
downloadsrc-c57596e1ae0f20220b10a854dc23969908505b86.tar.gz
src-c57596e1ae0f20220b10a854dc23969908505b86.zip
m4: import from OpenBSD
By deraadt@ mkstemp() returns -1 on failure Obtained from: OpenBSD
Notes
Notes: svn path=/head/; revision=352070
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 7cefafb44017..c55bac4bbc8c 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 $ */
/*-
@@ -846,7 +846,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);