Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2019 17:34:25 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r342701 - head/sbin/savecore
Message-ID:  <201901021734.x02HYPHI019562@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Jan  2 17:34:25 2019
New Revision: 342701
URL: https://svnweb.freebsd.org/changeset/base/342701

Log:
  Fix an error check after r342699.
  
  Reported by:	gcc
  MFC with:	r342699
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sbin/savecore/savecore.c

Modified: head/sbin/savecore/savecore.c
==============================================================================
--- head/sbin/savecore/savecore.c	Wed Jan  2 17:13:55 2019	(r342700)
+++ head/sbin/savecore/savecore.c	Wed Jan  2 17:34:25 2019	(r342701)
@@ -258,7 +258,7 @@ writebounds(int savedirfd, int bounds)
 	FILE *fp;
 
 	if ((fp = xfopenat(savedirfd, "bounds", O_WRONLY | O_CREAT | O_TRUNC,
-	    "w", 0644)) < 0) {
+	    "w", 0644)) == NULL) {
 		logmsg(LOG_WARNING, "unable to write to bounds file: %m");
 		return;
 	}



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