* lib/encrypt.c: Avoid implicit conversion of pointers to booleans.

* lib/encrypt.c: Add parenthesis.
This commit is contained in:
nekral-guest 2008-05-26 01:07:13 +00:00
parent 09869159f7
commit 6ce26e12f5
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-05-26 Nicolas François <nicolas.francois@centraliens.net>
* lib/encrypt.c: Avoid implicit conversion of pointers to
booleans.
* lib/encrypt.c: Add parenthesis.
2008-05-26 Nicolas François <nicolas.francois@centraliens.net>
* lib/port.c: Avoid implicit conversion of pointers / integers /

View File

@ -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;
}