fix assorted unused code and wrong format specs found by cppchekc (bug 6716)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2013-11-29 16:43:33 +01:00
parent 1a7256ac38
commit 9b2a9f0210
20 changed files with 25 additions and 39 deletions

View File

@ -86,7 +86,7 @@ md5_crypt(char result[MD5_OUT_BUFSIZE], const unsigned char *pw, const unsigned
/* Get the length of the salt including "$1$" */
sl = 3;
while (salt[sl] && salt[sl] != '$' && sl < (3 + 8))
while (sl < (3 + 8) && salt[sl] && salt[sl] != '$')
sl++;
/* Hash. the password first, since that is what is most unknown */