diff --git a/ChangeLog b/ChangeLog index 461fd80a..764cc2cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-04-22 Nicolas François + + * libmisc/pwdcheck.c (passwd_check): The progname is not used. + * libmisc/pwdcheck.c: Ignore the return value of sleep(). + * libmisc/pwdcheck.c: Use exit(EXIT_FAILURE) instead of exit(1). + 2009-04-22 Nicolas François * libmisc/setupenv.c: Avoid assignments in comparisons. @@ -5,7 +11,7 @@ * libmisc/setupenv.c: Ignore the return value of fclose (file opened read-only) * libmisc/setupenv.c: Ignore the return value of puts(). - * libmisc/setupenv.c:Avoid implicit conversion of pointers to + * libmisc/setupenv.c: Avoid implicit conversion of pointers to booleans. 2009-04-22 Nicolas François diff --git a/libmisc/pwdcheck.c b/libmisc/pwdcheck.c index 71c08f36..ec1f4744 100644 --- a/libmisc/pwdcheck.c +++ b/libmisc/pwdcheck.c @@ -40,7 +40,7 @@ #include "defines.h" #include "pwauth.h" -void passwd_check (const char *user, const char *passwd, const char *progname) +void passwd_check (const char *user, const char *passwd, unused const char *progname) { struct spwd *sp; @@ -50,9 +50,9 @@ void passwd_check (const char *user, const char *passwd, const char *progname) } if (pw_auth (passwd, user, PW_LOGIN, (char *) 0) != 0) { SYSLOG ((LOG_WARN, "incorrect password for `%s'", user)); - sleep (1); + (void) sleep (1); fprintf (stderr, _("Incorrect password for %s.\n"), user); - exit (1); + exit (EXIT_FAILURE); } } #else /* USE_PAM */