diff --git a/ChangeLog b/ChangeLog index 3e2bfb82..815579cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-21 Nicolas François + + * src/passwd.c: Fix a const issue. + * src/passwd.c: Avoid multi-statements lines. + 2010-08-21 Nicolas François * libmisc/copydir.c, lib/prototypes.h: Caller can choose not to diff --git a/src/passwd.c b/src/passwd.c index ea51acd3..c677f082 100644 --- a/src/passwd.c +++ b/src/passwd.c @@ -221,7 +221,7 @@ static int new_password (const struct passwd *pw) int i; /* Counter for retries */ int warned; int pass_max_len = -1; - char *method; + const char *method; #ifdef HAVE_LIBCRACK_HIST 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 initial login passwords. */ - if ((method = getdef_str ("ENCRYPT_METHOD")) == NULL) { + method = getdef_str ("ENCRYPT_METHOD"); + if (NULL == method) { if (!getdef_bool ("MD5_CRYPT_ENAB")) { pass_max_len = getdef_num ("PASS_MAX_LEN", 8); }