diff options
author | Marco d'Itri <md@linux.it> | 2018-09-11 01:17:01 +0200 |
---|---|---|
committer | Marco d'Itri <md@linux.it> | 2018-09-16 03:36:38 +0200 |
commit | 61f4e5d64c9ad64ff6b70bb2bf0afb3165bb9c51 (patch) | |
tree | d4cd4c3a79f826642aa98785446afb716f5924c8 /mkpasswd.c | |
parent | c1cb4b2ca0ad1f237cccc84a4f1b84cd60a76a15 (diff) | |
download | whois-61f4e5d64c9ad64ff6b70bb2bf0afb3165bb9c51.tar.gz |
mkpasswd: simplify a check for errors
salt is a const char *, so we know that it cannot be modified as a side
effect.
Diffstat (limited to 'mkpasswd.c')
-rw-r--r-- | mkpasswd.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -348,9 +348,7 @@ int main(int argc, char *argv[]) fprintf(stderr, "crypt failed.\n"); exit(2); } - /* yes, using strlen(salt_prefix) on salt. It's not - * documented whether crypt_gensalt may change the prefix */ - if (!strneq(result, salt, strlen(salt_prefix))) { + if (!strneq(result, salt, strlen(salt))) { fprintf(stderr, _("Method not supported by crypt(3).\n")); exit(2); } |