]> granicus.if.org Git - shadow/commitdiff
* libmisc/age.c: Use exit(EXIT_FAILURE) instead of exit(1).
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 23 Apr 2009 11:14:18 +0000 (11:14 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 23 Apr 2009 11:14:18 +0000 (11:14 +0000)
* libmisc/age.c: The return value of execl() is not used.

ChangeLog
libmisc/age.c

index 442b578ca22a6c493f1d04249144fbc84392607a..183b805246adab4f23cd326bd811cc31155731cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,
index 7b28d14af62537fbb23aa9859f96a3217711165c..d46abdc3c8b3c8a038c7c5876bda7b7d1c6c2786 100644 (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