diff --git a/ChangeLog b/ChangeLog index b4f0cc34..6f49f178 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-26 Nicolas François + + * lib/encrypt.c: Avoid implicit conversion of pointers to + booleans. + * lib/encrypt.c: Add parenthesis. + 2008-05-26 Nicolas François * lib/port.c: Avoid implicit conversion of pointers / integers / diff --git a/lib/encrypt.c b/lib/encrypt.c index 80ab6c49..1a97dc88 100644 --- a/lib/encrypt.c +++ b/lib/encrypt.c @@ -58,7 +58,7 @@ char *pw_encrypt (const char *clear, const char *salt) /* The GNU crypt does not return NULL if the algorithm is not * supported, and return a DES encrypted password. */ - if (salt && salt[0] == '$' && strlen (cp) <= 13) + if ((NULL != salt) && (salt[0] == '$') && (strlen (cp) <= 13)) { const char *method; switch (salt[1]) @@ -91,3 +91,4 @@ char *pw_encrypt (const char *clear, const char *salt) return cipher; } +