Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Sep 2019 15:37:41 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r352070 - head/usr.bin/m4
Message-ID:  <201909091537.x89FbfIV010735@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909091537.x89FbfIV010735>