Avoid duplicate initializations; reorder for consistency w/ decl

This commit is contained in:
Frank Denis 2017-09-10 22:19:51 +02:00
parent 81cf1ff6d1
commit 1aae564da3

View File

@ -236,8 +236,8 @@ _needs_rehash(const char *str, unsigned long long opslimit, size_t memlimit,
if ((fodder = (unsigned char *) calloc(fodder_len, 1U)) == NULL) { if ((fodder = (unsigned char *) calloc(fodder_len, 1U)) == NULL) {
return -1; return -1;
} }
ctx.salt = ctx.pwd = ctx.salt = ctx.out = fodder; ctx.out = ctx.pwd = ctx.salt = fodder;
ctx.saltlen = ctx.pwdlen = ctx.saltlen = ctx.outlen = (uint32_t) fodder_len; ctx.outlen = ctx.pwdlen = ctx.saltlen = (uint32_t) fodder_len;
ctx.ad = ctx.secret = NULL; ctx.ad = ctx.secret = NULL;
ctx.adlen = ctx.secretlen = 0U; ctx.adlen = ctx.secretlen = 0U;
if (decode_string(&ctx, str, type) != 0) { if (decode_string(&ctx, str, type) != 0) {