From: Jim Meyering Date: Mon, 20 Nov 2006 09:25:38 +0000 (+0000) Subject: Use cleaner syntax: NULL rather than 0. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d35036bd317d996930bdf3510da3f00204de80e;p=pspp Use cleaner syntax: NULL rather than 0. * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0. --- diff --git a/ChangeLog b/ChangeLog index 222053c7de..9259a13b6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-20 Jim Meyering + + Use cleaner syntax: NULL rather than 0. + * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0. + 2006-11-20 Paul Eggert * lib/idcache.c: Undo most recent patch, dated 2006-11-06. diff --git a/lib/idcache.c b/lib/idcache.c index d4a867d7b9..58d8fe6104 100644 --- a/lib/idcache.c +++ b/lib/idcache.c @@ -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; }