]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
* src/chgpasswd.c, src/chpasswd.c, src/newusers.c: Replace cflg by
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 14 Aug 2011 14:44:35 +0000 (14:44 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sun, 14 Aug 2011 14:44:35 +0000 (14:44 +0000)
a test on crypt_method.

ChangeLog
src/chgpasswd.c
src/chpasswd.c
src/newusers.c

index b4cdb85a2f5c2f8d44ed5f5131202098193a800b..5530983b96cbe85a058226c939dbfbbcf5e0780f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-14  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/chgpasswd.c, src/chpasswd.c, src/newusers.c: Replace cflg by
+       a test on crypt_method.
+
 2011-08-14  Nicolas François  <nicolas.francois@centraliens.net>
 
        * libmisc/chowndir.c: Add splint annotations.
index 3ba79b5080c4f9b8a38f3b82fe3f2d2a227e1a38..2aadf46a5ef7984874e2e78cc81909991ac98f60 100644 (file)
@@ -58,7 +58,6 @@
  * Global variables
  */
 const char *Prog;
-static bool cflg   = false;
 static bool eflg   = false;
 static bool md5flg = false;
 #ifdef USE_SHA_CRYPT
@@ -66,6 +65,7 @@ static bool sflg   = false;
 #endif
 
 static /*@null@*//*@observer@*/const char *crypt_method = NULL;
+#define cflg (NULL != crypt_method)
 #ifdef USE_SHA_CRYPT
 static long sha_rounds = 5000;
 #endif
@@ -174,7 +174,6 @@ static void process_flags (int argc, char **argv)
                                 long_options, &option_index)) != -1) {
                switch (c) {
                case 'c':
-                       cflg = true;
                        crypt_method = optarg;
                        break;
                case 'e':
index eb3bd873fcf7b8643080aa470596ca8938e88ae2..b4515e615063ae0628bd55922874f076f4390d50 100644 (file)
@@ -55,7 +55,6 @@
  * Global variables
  */
 const char *Prog;
-static bool cflg   = false;
 static bool eflg   = false;
 static bool md5flg = false;
 #ifdef USE_SHA_CRYPT
@@ -63,6 +62,7 @@ static bool sflg   = false;
 #endif                         /* USE_SHA_CRYPT */
 
 static /*@null@*//*@observer@*/const char *crypt_method = NULL;
+#define cflg (NULL != crypt_method)
 #ifdef USE_SHA_CRYPT
 static long sha_rounds = 5000;
 #endif                         /* USE_SHA_CRYPT */
@@ -170,7 +170,6 @@ static void process_flags (int argc, char **argv)
                        usage (E_SUCCESS);
                        /*@notreached@*/break;
                case 'c':
-                       cflg = true;
                        crypt_method = optarg;
                        break;
                case 'e':
index a88d9b77162eee442aae02b71c78af1bce40fbc7..fc90b2db8e050bb4307d52dfe41b04c34adbf0c6 100644 (file)
@@ -74,8 +74,8 @@ const char *Prog;
 
 static bool rflg = false;      /* create a system account */
 #ifndef USE_PAM
-static bool cflg = false;
 static /*@null@*//*@observer@*/char *crypt_method = NULL;
+#define cflg (NULL != crypt_method)
 #ifdef USE_SHA_CRYPT
 static bool sflg = false;
 static long sha_rounds = 5000;
@@ -556,7 +556,6 @@ static void process_flags (int argc, char **argv)
                        break;
 #ifndef USE_PAM
                case 'c':
-                       cflg = true;
                        crypt_method = optarg;
                        break;
 #ifdef USE_SHA_CRYPT