mirror of
https://github.com/rfc1036/whois.git
synced 2026-05-03 06:51:09 +00:00
mkpasswd: simplify a check for errors
salt is a const char *, so we know that it cannot be modified as a side effect.
This commit is contained in:
parent
c1cb4b2ca0
commit
61f4e5d64c
@ -348,9 +348,7 @@ int main(int argc, char *argv[])
|
|||||||
fprintf(stderr, "crypt failed.\n");
|
fprintf(stderr, "crypt failed.\n");
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
/* yes, using strlen(salt_prefix) on salt. It's not
|
if (!strneq(result, salt, strlen(salt))) {
|
||||||
* documented whether crypt_gensalt may change the prefix */
|
|
||||||
if (!strneq(result, salt, strlen(salt_prefix))) {
|
|
||||||
fprintf(stderr, _("Method not supported by crypt(3).\n"));
|
fprintf(stderr, _("Method not supported by crypt(3).\n"));
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user