diff options
author | Xin LI <delphij@FreeBSD.org> | 2018-07-20 07:07:27 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2018-07-20 07:07:27 +0000 |
commit | a7e92a77da0fb320e096973088dcf616961bddb8 (patch) | |
tree | e216d37272c8013485fb8433640b5c0a75848a1f /lib/libcrypt/crypt-sha256.c | |
parent | 66bdf50face2485fdb7164cf563cbc595370cd3e (diff) | |
download | src-a7e92a77da0fb320e096973088dcf616961bddb8.tar.gz src-a7e92a77da0fb320e096973088dcf616961bddb8.zip |
Get rid of unused variables.
copied_key and copied_salt are assigned with NULL and never used
otherwise. Remove the two variables and related code.
Reviewed by: pfg
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D16314
Notes
Notes:
svn path=/head/; revision=336540
Diffstat (limited to 'lib/libcrypt/crypt-sha256.c')
-rw-r--r-- | lib/libcrypt/crypt-sha256.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/libcrypt/crypt-sha256.c b/lib/libcrypt/crypt-sha256.c index 6291fc12f2ad..d5b586789692 100644 --- a/lib/libcrypt/crypt-sha256.c +++ b/lib/libcrypt/crypt-sha256.c @@ -68,13 +68,10 @@ crypt_sha256(const char *key, const char *salt, char *buffer) uint8_t alt_result[32], temp_result[32]; SHA256_CTX ctx, alt_ctx; size_t salt_len, key_len, cnt, rounds; - char *cp, *copied_key, *copied_salt, *p_bytes, *s_bytes, *endp; + char *cp, *p_bytes, *s_bytes, *endp; const char *num; bool rounds_custom; - copied_key = NULL; - copied_salt = NULL; - /* Default number of rounds. */ rounds = ROUNDS_DEFAULT; rounds_custom = false; @@ -244,10 +241,6 @@ crypt_sha256(const char *key, const char *salt, char *buffer) memset(s_bytes, '\0', salt_len); memset(&ctx, '\0', sizeof(ctx)); memset(&alt_ctx, '\0', sizeof(alt_ctx)); - if (copied_key != NULL) - memset(copied_key, '\0', key_len); - if (copied_salt != NULL) - memset(copied_salt, '\0', salt_len); return (0); } |