a test on crypt_method.
+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.
* Global variables
*/
const char *Prog;
-static bool cflg = false;
static bool eflg = false;
static bool md5flg = false;
#ifdef USE_SHA_CRYPT
#endif
static /*@null@*//*@observer@*/const char *crypt_method = NULL;
+#define cflg (NULL != crypt_method)
#ifdef USE_SHA_CRYPT
static long sha_rounds = 5000;
#endif
long_options, &option_index)) != -1) {
switch (c) {
case 'c':
- cflg = true;
crypt_method = optarg;
break;
case 'e':
* Global variables
*/
const char *Prog;
-static bool cflg = false;
static bool eflg = false;
static bool md5flg = false;
#ifdef USE_SHA_CRYPT
#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 */
usage (E_SUCCESS);
/*@notreached@*/break;
case 'c':
- cflg = true;
crypt_method = optarg;
break;
case 'e':
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;
break;
#ifndef USE_PAM
case 'c':
- cflg = true;
crypt_method = optarg;
break;
#ifdef USE_SHA_CRYPT