Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2020 08:16:16 +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: r356723 - head/usr.bin/diff
Message-ID:  <202001140816.00E8GGUs018518@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Tue Jan 14 08:16:15 2020
New Revision: 356723
URL: https://svnweb.freebsd.org/changeset/base/356723

Log:
  mkstemp returns -1
  
  Obtained from:	OpenBSD
  MFC after:	3 days

Modified:
  head/usr.bin/diff/diffreg.c

Modified: head/usr.bin/diff/diffreg.c
==============================================================================
--- head/usr.bin/diff/diffreg.c	Tue Jan 14 06:28:07 2020	(r356722)
+++ head/usr.bin/diff/diffreg.c	Tue Jan 14 08:16:15 2020	(r356723)
@@ -1,4 +1,4 @@
-/*	$OpenBSD: diffreg.c,v 1.91 2016/03/01 20:57:35 natano Exp $	*/
+/*	$OpenBSD: diffreg.c,v 1.92 2019/06/28 05:35:34 deraadt Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-4-Clause
@@ -451,7 +451,7 @@ opentemp(const char *f)
 
 	(void)strlcpy(tempfile, _PATH_TMP "/diff.XXXXXXXX", sizeof(tempfile));
 
-	if ((ofd = mkstemp(tempfile)) < 0) {
+	if ((ofd = mkstemp(tempfile)) == -1) {
 		close(ifd);
 		return (NULL);
 	}



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