Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2016 12:53:38 +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: r297965 - head/usr.sbin/lmcconfig
Message-ID:  <201604141253.u3ECrcHS083416@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: araujo
Date: Thu Apr 14 12:53:38 2016
New Revision: 297965
URL: https://svnweb.freebsd.org/changeset/base/297965

Log:
  Use NULL instead of 0 for pointers.
  
  fopen(3) will return NULL in case it can't open the STREAM.

Modified:
  head/usr.sbin/lmcconfig/lmcconfig.c

Modified: head/usr.sbin/lmcconfig/lmcconfig.c
==============================================================================
--- head/usr.sbin/lmcconfig/lmcconfig.c	Thu Apr 14 12:51:06 2016	(r297964)
+++ head/usr.sbin/lmcconfig/lmcconfig.c	Thu Apr 14 12:53:38 2016	(r297965)
@@ -2008,7 +2008,7 @@ load_xilinx(char *name)
   int c;
 
   if (verbose) printf("Load firmware from file %s...\n", name);
-  if ((f = fopen(name, "r")) == 0)
+  if ((f = fopen(name, "r")) == NULL)
     {
     perror("Failed to open file");
     exit(1);



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