mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Standardize treatment of strcmp() return value
Always compare the return value to 0, don't use cute tricks like if (!strcmp(...)).
This commit is contained in:
@ -55,7 +55,7 @@ px_crypt_md5(const char *pw, const char *salt, char *passwd, unsigned dstlen)
|
||||
sp = salt;
|
||||
|
||||
/* If it starts with the magic string, then skip that */
|
||||
if (!strncmp(sp, magic, strlen(magic)))
|
||||
if (strncmp(sp, magic, strlen(magic)) == 0)
|
||||
sp += strlen(magic);
|
||||
|
||||
/* It stops at the first '$', max 8 chars */
|
||||
|
Reference in New Issue
Block a user