* lib/exitcodes.h: Define E_SUCCESS as EXIT_SUCCESS. Added FIXMEs.
* libmisc/chowntty.c, libmisc/rlogin.c, libmisc/sub.c, src/newusers.c, libmisc/sulog.c, libmisc/system.c, src/logoutd.c, src/groups.c, src/id.c, lib/encrypt.c, libmisc/audit_help.c, libmisc/limits.c: Return EXIT_FAILURE instead of 1, and EXIT_SUCCESS instead of 0. * libmisc/audit_help.c: Replace an fprintf() by fputs(). * libmisc/audit_help.c: Remove documentation of the audit_logger returned values. The function returns void. * libmisc/system.c: Only return status if waitpid succeeded. Return -1 otherwise.
This commit is contained in:
@@ -64,7 +64,7 @@ static void print_groups (const char *member)
|
||||
if (NULL == pwd) {
|
||||
(void) fprintf (stderr, _("%s: unknown user %s\n"),
|
||||
Prog, member);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
setgrent ();
|
||||
@@ -146,7 +146,7 @@ int main (int argc, char **argv)
|
||||
ngroups = getgroups (sys_ngroups, groups);
|
||||
if (ngroups < 0) {
|
||||
perror ("getgroups");
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -203,7 +203,7 @@ int main (int argc, char **argv)
|
||||
if (NULL != logname) {
|
||||
print_groups (logname);
|
||||
} else {
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
@@ -214,6 +214,6 @@ int main (int argc, char **argv)
|
||||
*/
|
||||
print_groups (argv[1]);
|
||||
}
|
||||
exit (0);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user