]> granicus.if.org Git - shadow/commitdiff
* lib/encrypt.c: Avoid implicit conversion of pointers to booleans.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 26 May 2008 01:07:13 +0000 (01:07 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 26 May 2008 01:07:13 +0000 (01:07 +0000)
* lib/encrypt.c: Add parenthesis.

ChangeLog
lib/encrypt.c

index b4f0cc344f774fbca834c2b1eebca7d75f0598a1..6f49f178e25fc905e0d6e1a775d0dbef6c4f09f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 /
index 80ab6c496ad308e9ab57c2239e15bd57e24977b9..1a97dc883cc17ab283d5fe2b499d51284cda90a3 100644 (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;
 }
+