1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Remove unused variable in tests

Fixes #998
This commit is contained in:
Frank Denis 2020-09-29 11:05:31 +02:00
parent a95ec8a1d5
commit 6cf5e97bf6

View File

@ -297,16 +297,12 @@ str_tests(void)
{
char *str_out;
char *str_out2;
char *salt;
const char *passwd = "Correct Horse Battery Staple";
salt = (char *) sodium_malloc(crypto_pwhash_scryptsalsa208sha256_SALTBYTES);
str_out =
(char *) sodium_malloc(crypto_pwhash_scryptsalsa208sha256_STRBYTES);
str_out2 =
(char *) sodium_malloc(crypto_pwhash_scryptsalsa208sha256_STRBYTES);
memcpy(salt, "[<~A 32-bytes salt for scrypt~>]",
crypto_pwhash_scryptsalsa208sha256_SALTBYTES);
if (crypto_pwhash_scryptsalsa208sha256_str(str_out, passwd, strlen(passwd),
OPSLIMIT, MEMLIMIT) != 0) {
printf("pwhash_str failure\n");
@ -360,7 +356,6 @@ str_tests(void)
assert(crypto_pwhash_scryptsalsa208sha256_str_needs_rehash
("", OPSLIMIT, MEMLIMIT) == -1);
sodium_free(salt);
sodium_free(str_out);
sodium_free(str_out2);
}