Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2016 07:09:34 +0000 (UTC)
From:      Marcelo Araujo <araujo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r298190 - head/usr.bin/m4
Message-ID:  <201604180709.u3I79YBO052445@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Mon Apr 18 07:09:34 2016
New Revision: 298190
URL: https://svnweb.freebsd.org/changeset/base/298190

Log:
  Use NULL instead of 0 for pointers.
  
  fopen(3) will return NULL in case it cannot open the STREAM.
  
  MFC after:	2 weeks.

Modified:
  head/usr.bin/m4/gnum4.c

Modified: head/usr.bin/m4/gnum4.c
==============================================================================
--- head/usr.bin/m4/gnum4.c	Mon Apr 18 07:05:18 2016	(r298189)
+++ head/usr.bin/m4/gnum4.c	Mon Apr 18 07:09:34 2016	(r298190)
@@ -129,7 +129,7 @@ dopath(struct input_file *i, const char 
 
 	for (pe = first; pe; pe = pe->next) {
 		snprintf(path, sizeof(path), "%s/%s", pe->name, filename);
-		if ((f = fopen(path, "r")) != 0) {
+		if ((f = fopen(path, "r")) != NULL) {
 			set_input(i, f, path);
 			return i;
 		}



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