projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Optimize bn_correct_top.
[openssl.git]
/
crypto
/
bn
/
bn.h
diff --git
a/crypto/bn/bn.h
b/crypto/bn/bn.h
index 4749c52341f7e55aa8f0a0aa06086e1a10b1ec73..dc0debb85afbe2a079632216d4fd64c0a410115b 100644
(file)
--- a/
crypto/bn/bn.h
+++ b/
crypto/bn/bn.h
@@
-752,10
+752,12
@@
int RAND_pseudo_bytes(unsigned char *buf,int num);
#define bn_correct_top(a) \
{ \
BN_ULONG *ftl; \
#define bn_correct_top(a) \
{ \
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--) \
- if (*(ftl--)) break; \
+ for (ftl= &((a)->d[top-1]); top > 0; top--) \
+ if (*(ftl--)) break; \
+ (a)->top = top; \
} \
bn_pollute(a); \
}
} \
bn_pollute(a); \
}