crypto: nx - Remove the unneeded result variable

Return the value set_msg_len() directly instead of storing it in another
redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Reviewed-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
ye xingchen 2022-09-02 07:30:55 +00:00 коммит произвёл Herbert Xu
Родитель 68dbe80f5b
Коммит 96d3e6f05f
1 изменённых файлов: 1 добавлений и 4 удалений

Просмотреть файл

@ -134,7 +134,6 @@ static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize,
unsigned int cryptlen, u8 *b0)
{
unsigned int l, lp, m = authsize;
int rc;
memcpy(b0, iv, 16);
@ -148,9 +147,7 @@ static int generate_b0(u8 *iv, unsigned int assoclen, unsigned int authsize,
if (assoclen)
*b0 |= 64;
rc = set_msg_len(b0 + 16 - l, cryptlen, l);
return rc;
return set_msg_len(b0 + 16 - l, cryptlen, l);
}
static int generate_pat(u8 *iv,