From bb6747620986254c58fc6998b1bed57d85304f72 Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Fri, 22 Jul 2011 22:39:30 +0000 Subject: [PATCH] * src/expiry.c: Remove dead code. * src/expiry.c: Improve comments. --- ChangeLog | 5 +++++ src/expiry.c | 24 +++++++----------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index a73127e6..7ddd0d71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-07-23 Nicolas François + + * src/expiry.c: Remove dead code. + * src/expiry.c: Improve comments. + 2011-07-23 Nicolas François * src/grpck.c: Added comments. diff --git a/src/expiry.c b/src/expiry.c index 6718727b..04513f3b 100644 --- a/src/expiry.c +++ b/src/expiry.c @@ -2,7 +2,7 @@ * Copyright (c) 1994 , Julianne Frances Haugh * Copyright (c) 1996 - 2000, Marek Michałkiewicz * Copyright (c) 2001 - 2006, Tomasz Kłoczko - * Copyright (c) 2007 - 2008, Nicolas François + * Copyright (c) 2007 - 2011, Nicolas François * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -136,23 +136,13 @@ int main (int argc, char **argv) } /* - * If forcing password change, use expire() function. + * Otherwise, force a password change with the expire() function. + * It will force the change or give a message indicating what to + * do. + * It won't return unless the account is unexpired. */ - if (strcmp (argv[1], "-f") == 0) { + expire (pwd, spwd); - /* - * Just call expire(). It will force the change or give a - * message indicating what to do. And it doesn't return at - * all unless the account is unexpired. - */ - expire (pwd, spwd); - exit (0); - } - - /* - * Can't get here ... - */ - usage (); - exit (1); + exit (0); } -- 2.40.0