* src/passwd.c: Fix a const issue.

* src/passwd.c: Avoid multi-statements lines.
This commit is contained in:
nekral-guest 2010-08-21 19:55:46 +00:00
parent c56d59c90b
commit 7bb81f6c3e
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2010-08-21 Nicolas François <nicolas.francois@centraliens.net>
* src/passwd.c: Fix a const issue.
* src/passwd.c: Avoid multi-statements lines.
2010-08-21 Nicolas François <nicolas.francois@centraliens.net> 2010-08-21 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/copydir.c, lib/prototypes.h: Caller can choose not to * libmisc/copydir.c, lib/prototypes.h: Caller can choose not to

View File

@ -221,7 +221,7 @@ static int new_password (const struct passwd *pw)
int i; /* Counter for retries */ int i; /* Counter for retries */
int warned; int warned;
int pass_max_len = -1; int pass_max_len = -1;
char *method; const char *method;
#ifdef HAVE_LIBCRACK_HIST #ifdef HAVE_LIBCRACK_HIST
int HistUpdate (const char *, const char *); int HistUpdate (const char *, const char *);
@ -261,7 +261,8 @@ static int new_password (const struct passwd *pw)
* for strength, unless it is the root user. This provides an escape * for strength, unless it is the root user. This provides an escape
* for initial login passwords. * for initial login passwords.
*/ */
if ((method = getdef_str ("ENCRYPT_METHOD")) == NULL) { method = getdef_str ("ENCRYPT_METHOD");
if (NULL == method) {
if (!getdef_bool ("MD5_CRYPT_ENAB")) { if (!getdef_bool ("MD5_CRYPT_ENAB")) {
pass_max_len = getdef_num ("PASS_MAX_LEN", 8); pass_max_len = getdef_num ("PASS_MAX_LEN", 8);
} }