Skip to content

Commit

Permalink
mpi_mul_hlp: microoptimization
Browse files Browse the repository at this point in the history
If c == 0, no need to add it to *d.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
  • Loading branch information
gilles-peskine-arm committed Dec 7, 2020
1 parent 8fd95c6 commit 8e464c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -1607,10 +1607,10 @@ void mpi_mul_hlp( size_t i,

t++;

do {
while( c != 0 )
{
*d += c; c = ( *d < c ); d++;
}
while( c != 0 );
}

/*
Expand Down

0 comments on commit 8e464c4

Please sign in to comment.