From 6affea028b655ebf8d6dc2181d4a2f94424153ac Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 12 Dec 2012 10:41:44 +0100 Subject: [PATCH] chfn: always use return rather than exit() in main Signed-off-by: Karel Zak --- login-utils/chfn.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/login-utils/chfn.c b/login-utils/chfn.c index a86f380c0b..76c0b03eee 100644 --- a/login-utils/chfn.c +++ b/login-utils/chfn.c @@ -165,22 +165,22 @@ int main(int argc, char **argv) retcode = pam_start("chfn", oldf.username, &conv, &pamh); if (pam_fail_check(pamh, retcode)) - exit(EXIT_FAILURE); + return EXIT_FAILURE; retcode = pam_authenticate(pamh, 0); if (pam_fail_check(pamh, retcode)) - exit(EXIT_FAILURE); + return EXIT_FAILURE; retcode = pam_acct_mgmt(pamh, 0); if (retcode == PAM_NEW_AUTHTOK_REQD) retcode = pam_chauthtok(pamh, PAM_CHANGE_EXPIRED_AUTHTOK); if (pam_fail_check(pamh, retcode)) - exit(EXIT_FAILURE); + return EXIT_FAILURE; retcode = pam_setcred(pamh, 0); if (pam_fail_check(pamh, retcode)) - exit(EXIT_FAILURE); + return EXIT_FAILURE; pam_end(pamh, 0); /* no need to establish a session; this isn't a -- 2.47.3