mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
crypto: lib/mpi - delete unnecessary condition
We checked that "nlimbs" is non-zero in the outside if statement so delete the duplicate check here. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
101e99c23a
commit
fe69b772e3
@ -212,12 +212,10 @@ void mpi_rshift(MPI x, MPI a, unsigned int n)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nlimbs) {
|
for (i = 0; i < x->nlimbs - nlimbs; i++)
|
||||||
for (i = 0; i < x->nlimbs - nlimbs; i++)
|
x->d[i] = x->d[i+nlimbs];
|
||||||
x->d[i] = x->d[i+nlimbs];
|
x->d[i] = 0;
|
||||||
x->d[i] = 0;
|
x->nlimbs -= nlimbs;
|
||||||
x->nlimbs -= nlimbs;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (x->nlimbs && nbits)
|
if (x->nlimbs && nbits)
|
||||||
mpihelp_rshift(x->d, x->d, x->nlimbs, nbits);
|
mpihelp_rshift(x->d, x->d, x->nlimbs, nbits);
|
||||||
|
Loading…
Reference in New Issue
Block a user