Skip to content
Commit f00fa241 authored by Nicolai Stange's avatar Nicolai Stange Committed by Herbert Xu
Browse files

lib/mpi: mpi_read_buffer(): optimize skipping of leading zero limbs



Currently, if the number of leading zeros is greater than fits into a
complete limb, mpi_read_buffer() skips them by iterating over them
limb-wise.

Instead of skipping the high order zero limbs within the loop as shown
above, adjust the copying loop's bounds.

Signed-off-by: default avatarNicolai Stange <nicstange@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent d7552906
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