* libmisc/age.c: Use exit(EXIT_FAILURE) instead of exit(1).

* libmisc/age.c: The return value of execl() is not used.
This commit is contained in:
nekral-guest 2009-04-23 11:14:18 +00:00
parent 614c79defc
commit 35f0a2e951
2 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/age.c: Use exit(EXIT_FAILURE) instead of exit(1).
* libmisc/age.c: The return value of execl() is not used.
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/xgetXXbyYY.c, libmisc/myname.c, libmisc/getgr_nam_gid.c,

View File

@ -92,7 +92,7 @@ int expire (const struct passwd *pw, const struct spwd *sp)
if ((status > 1) || (sp->sp_max < sp->sp_min)) {
(void) puts (_(" Contact the system administrator."));
exit (1);
exit (EXIT_FAILURE);
}
(void) puts (_(" Choose a new password."));
(void) fflush (stdout);
@ -135,13 +135,13 @@ int expire (const struct passwd *pw, const struct spwd *sp)
_exit (126);
}
execl (PASSWD_PROGRAM, PASSWD_PROGRAM, pw->pw_name, (char *) 0);
(void) execl (PASSWD_PROGRAM, PASSWD_PROGRAM, pw->pw_name, (char *) 0);
err = errno;
perror ("Can't execute " PASSWD_PROGRAM);
_exit ((ENOENT == err) ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
} else if ((pid_t) -1 == pid) {
perror ("fork");
exit (1);
exit (EXIT_FAILURE);
}
while (((child = wait (&status)) != pid) && (child != (pid_t)-1));
@ -150,8 +150,8 @@ int expire (const struct passwd *pw, const struct spwd *sp)
return 1;
}
exit (1);
/*NOTREACHED*/}
exit (EXIT_FAILURE);
/*@notreached@*/}
/*
* agecheck - see if warning is needed for password expiration