projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
762a2e3
)
Optimize bn_correct_top.
author
Andy Polyakov
<appro@openssl.org>
Wed, 15 Oct 2008 10:48:52 +0000
(10:48 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Wed, 15 Oct 2008 10:48:52 +0000
(10:48 +0000)
crypto/bn/bn.h
patch
|
blob
|
history
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; \
- 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); \
}