Optimize bn_correct_top.
This commit is contained in:
parent
762a2e3cab
commit
256b3e9c5f
@ -752,10 +752,12 @@ int RAND_pseudo_bytes(unsigned char *buf,int num);
|
|||||||
#define bn_correct_top(a) \
|
#define bn_correct_top(a) \
|
||||||
{ \
|
{ \
|
||||||
BN_ULONG *ftl; \
|
BN_ULONG *ftl; \
|
||||||
if ((a)->top > 0) \
|
int top = (a)->top; \
|
||||||
|
if (top > 0) \
|
||||||
{ \
|
{ \
|
||||||
for (ftl= &((a)->d[(a)->top-1]); (a)->top > 0; (a)->top--) \
|
for (ftl= &((a)->d[top-1]); top > 0; top--) \
|
||||||
if (*(ftl--)) break; \
|
if (*(ftl--)) break; \
|
||||||
|
(a)->top = top; \
|
||||||
} \
|
} \
|
||||||
bn_pollute(a); \
|
bn_pollute(a); \
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user