Commit fe69b772 authored by Dan Carpenter's avatar Dan Carpenter Committed by Herbert Xu

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: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 101e99c2
......@@ -212,12 +212,10 @@ void mpi_rshift(MPI x, MPI a, unsigned int n)
return;
}
if (nlimbs) {
for (i = 0; i < x->nlimbs - nlimbs; i++)
x->d[i] = x->d[i+nlimbs];
x->d[i] = 0;
x->nlimbs -= nlimbs;
}
for (i = 0; i < x->nlimbs - nlimbs; i++)
x->d[i] = x->d[i+nlimbs];
x->d[i] = 0;
x->nlimbs -= nlimbs;
if (x->nlimbs && nbits)
mpihelp_rshift(x->d, x->d, x->nlimbs, nbits);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment