* src/groupmems.c: EXIT_READ_GROUP changed to EXIT_INVALID_GROUP.

* src/groupmems.c: EXIT_INVALID_USERNAME changed to EXIT_INVALID_USER.
	* src/groupmems.c: Fix typos.
This commit is contained in:
nekral-guest 2008-07-27 00:11:25 +00:00
parent 6f571dbfc6
commit 4c2ed7b52e
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2008-07-27 Nicolas François <nicolas.francois@centraliens.net>
* src/groupmems.c: EXIT_READ_GROUP changed to EXIT_INVALID_GROUP.
* src/groupmems.c: EXIT_INVALID_USERNAME changed to EXIT_INVALID_USER.
2008-07-26 Nicolas François <nicolas.francois@centraliens.net> 2008-07-26 Nicolas François <nicolas.francois@centraliens.net>
* src/groupmems.c: Really use booleans. * src/groupmems.c: Really use booleans.

View File

@ -86,7 +86,7 @@ static char *whoami (void)
struct passwd *usr = getpwuid (getuid ()); struct passwd *usr = getpwuid (getuid ());
if (0 == strcmp (usr->pw_name, grp->gr_name)) { if (0 == strcmp (usr->pw_name, grp->gr_name)) {
return (char *) strdup (usr->pw_name); return strdup (usr->pw_name);
} else { } else {
return NULL; return NULL;
} }
@ -227,9 +227,9 @@ int main (int argc, char **argv)
/* local, no need for xgetpwnam */ /* local, no need for xgetpwnam */
if (getpwnam (adduser) == NULL) { if (getpwnam (adduser) == NULL) {
fprintf (stderr, _("%s: user `%s' does not exist\n") fprintf (stderr, _("%s: user `%s' does not exist\n"),
Prog, adduser); Prog, adduser);
exit (EXIT_INVALID_USERNAME); exit (EXIT_INVALID_USER);
} }
if (!isroot () && NULL != thisgroup) { if (!isroot () && NULL != thisgroup) {
@ -296,7 +296,7 @@ int main (int argc, char **argv)
if (grp == NULL) { if (grp == NULL) {
fprintf (stderr, _("%s: `%s' not found in /etc/group\n"), fprintf (stderr, _("%s: `%s' not found in /etc/group\n"),
Prog, name); Prog, name);
exit (EXIT_READ_GROUP); exit (EXIT_INVALID_GROUP);
} }
if (NULL != adduser) { if (NULL != adduser) {