[Pkg-shadow-commits] r3433 - in upstream/trunk: . src

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Fri Jul 22 22:39:30 UTC 2011


Author: nekral-guest
Date: 2011-07-22 22:39:30 +0000 (Fri, 22 Jul 2011)
New Revision: 3433

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/expiry.c
Log:
	* src/expiry.c: Remove dead code.
	* src/expiry.c: Improve comments.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-07-22 22:07:23 UTC (rev 3432)
+++ upstream/trunk/ChangeLog	2011-07-22 22:39:30 UTC (rev 3433)
@@ -1,5 +1,10 @@
 2011-07-23  Nicolas François  <nicolas.francois at centraliens.net>
 
+	* src/expiry.c: Remove dead code.
+	* src/expiry.c: Improve comments.
+
+2011-07-23  Nicolas François  <nicolas.francois at centraliens.net>
+
 	* src/grpck.c: Added comments.
 	* src/grpck.c: Avoid implicit conversion of pointer to boolean.
 	* src/grpck.c: Remove dead code. argc cannot be lower than optind.

Modified: upstream/trunk/src/expiry.c
===================================================================
--- upstream/trunk/src/expiry.c	2011-07-22 22:07:23 UTC (rev 3432)
+++ upstream/trunk/src/expiry.c	2011-07-22 22:39:30 UTC (rev 3433)
@@ -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 @@
 	}
 
 	/*
-	 * 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);
 }
 




More information about the Pkg-shadow-commits mailing list