changeset 7671:0e4c9d56db95

Use cleaner syntax: NULL rather than 0. * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
author Jim Meyering <jim@meyering.net>
date Mon, 20 Nov 2006 09:25:38 +0000
parents 3e209ae211b2
children d2c7e0fe0b94
files ChangeLog lib/idcache.c
diffstat 2 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-20  Jim Meyering  <jim@meyering.net>
+
+	Use cleaner syntax: NULL rather than 0.
+	* lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
+
 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
 
 	* lib/idcache.c: Undo most recent patch, dated 2006-11-06.
--- a/lib/idcache.c
+++ b/lib/idcache.c
@@ -91,7 +91,7 @@
   for (tail = nouser_alist; tail; tail = tail->next)
     /* Avoid a function call for the most common case.  */
     if (*tail->name == *user && !strcmp (tail->name, user))
-      return 0;
+      return NULL;
 
   pwent = getpwnam (user);
 #ifdef __DJGPP__
@@ -118,7 +118,7 @@
 
   tail->next = nouser_alist;
   nouser_alist = tail;
-  return 0;
+  return NULL;
 }
 
 /* Use the same struct as for userids.  */
@@ -167,7 +167,7 @@
   for (tail = nogroup_alist; tail; tail = tail->next)
     /* Avoid a function call for the most common case.  */
     if (*tail->name == *group && !strcmp (tail->name, group))
-      return 0;
+      return NULL;
 
   grent = getgrnam (group);
 #ifdef __DJGPP__
@@ -194,5 +194,5 @@
 
   tail->next = nogroup_alist;
   nogroup_alist = tail;
-  return 0;
+  return NULL;
 }