From: Jim Meyering Date: Fri, 30 Aug 2002 23:04:53 +0000 (+0000) Subject: Change `error (1, ...' to `error (EXIT_FAILURE, ...'. X-Git-Tag: v2.22-rc1~347^2~10^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=046582e4ba5f1b7823d36fad114f10a27dc9b926;p=thirdparty%2Futil-linux.git Change `error (1, ...' to `error (EXIT_FAILURE, ...'. --- diff --git a/login-utils/su.c b/login-utils/su.c index 3d834679ef..5b1328ccf0 100644 --- a/login-utils/su.c +++ b/login-utils/su.c @@ -347,13 +347,13 @@ change_identity (const struct passwd *pw) #ifdef HAVE_INITGROUPS errno = 0; if (initgroups (pw->pw_name, pw->pw_gid) == -1) - error (1, errno, _("cannot set groups")); + error (EXIT_FAILURE, errno, _("cannot set groups")); endgrent (); #endif if (setgid (pw->pw_gid)) - error (1, errno, _("cannot set group id")); + error (EXIT_FAILURE, errno, _("cannot set group id")); if (setuid (pw->pw_uid)) - error (1, errno, _("cannot set user id")); + error (EXIT_FAILURE, errno, _("cannot set user id")); } /* Run SHELL, or DEFAULT_SHELL if SHELL is empty. @@ -526,7 +526,7 @@ main (int argc, char **argv) pw = getpwnam (new_user); if (pw == 0) - error (1, 0, _("user %s does not exist"), new_user); + error (EXIT_FAILURE, 0, _("user %s does not exist"), new_user); endpwent (); /* Make sure pw->pw_shell is non-NULL. It may be NULL when NEW_USER @@ -549,7 +549,7 @@ main (int argc, char **argv) #ifdef SYSLOG_FAILURE log_su (pw, 0); #endif - error (1, 0, _("incorrect password")); + error (EXIT_FAILURE, 0, _("incorrect password")); } #ifdef SYSLOG_SUCCESS else