svn commit: r352070 - head/usr.bin/m4
Baptiste Daroussin
bapt at FreeBSD.org
Mon Sep 9 15:37:41 UTC 2019
Author: bapt
Date: Mon Sep 9 15:37:40 2019
New Revision: 352070
URL: https://svnweb.freebsd.org/changeset/base/352070
Log:
m4: import from OpenBSD
By deraadt@
mkstemp() returns -1 on failure
Obtained from: OpenBSD
Modified:
head/usr.bin/m4/eval.c
Modified: head/usr.bin/m4/eval.c
==============================================================================
--- head/usr.bin/m4/eval.c Mon Sep 9 15:35:34 2019 (r352069)
+++ head/usr.bin/m4/eval.c Mon Sep 9 15:37:40 2019 (r352070)
@@ -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);
More information about the svn-src-all
mailing list