Mercurial > gnulib
changeset 27362:2c8e1815b4a3
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 | e2babb2ef489 |
children | 9f57d78c88c9 |
files | ChangeLog lib/idcache.c |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Nov 20 09:10:18 2006 +0000 +++ b/ChangeLog Mon Nov 20 09:25:38 2006 +0000 @@ -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 Mon Nov 20 09:10:18 2006 +0000 +++ b/lib/idcache.c Mon Nov 20 09:25:38 2006 +0000 @@ -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; }