Use cleaner syntax: NULL rather than 0.
authorJim Meyering <jim@meyering.net>
Mon, 20 Nov 2006 09:25:38 +0000 (09:25 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 20 Nov 2006 09:25:38 +0000 (09:25 +0000)
* lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.

ChangeLog
lib/idcache.c

index 222053c..9259a13 100644 (file)
--- 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.
index d4a867d..58d8fe6 100644 (file)
@@ -91,7 +91,7 @@ getuidbyname (const char *user)
   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 @@ getuidbyname (const char *user)
 
   tail->next = nouser_alist;
   nouser_alist = tail;
-  return 0;
+  return NULL;
 }
 
 /* Use the same struct as for userids.  */
@@ -167,7 +167,7 @@ getgidbyname (const char *group)
   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 @@ getgidbyname (const char *group)
 
   tail->next = nogroup_alist;
   nogroup_alist = tail;
-  return 0;
+  return NULL;
 }