summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn.h
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2005-08-28 22:49:57 +0000
committerNils Larsch <nils@openssl.org>2005-08-28 22:49:57 +0000
commit8215e7a93897347a97de87b3d26fe84cc8a5b05d (patch)
tree8b36ff9369a0e0a6f6fde828209564a32715080c /crypto/bn/bn.h
parentf7622f86d939c2761b2ab148311b870e0785df12 (diff)
fix warnings when building openssl with the following compiler options:
-Wmissing-prototypes -Wcomment -Wformat -Wimplicit -Wmain -Wmultichar -Wswitch -Wshadow -Wtrigraphs -Werror -Wchar-subscripts -Wstrict-prototypes -Wreturn-type -Wpointer-arith -W -Wunused -Wno-unused-parameter -Wuninitialized
Diffstat (limited to 'crypto/bn/bn.h')
-rw-r--r--crypto/bn/bn.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h
index b990ff2b5d..2688684b63 100644
--- a/crypto/bn/bn.h
+++ b/crypto/bn/bn.h
@@ -699,9 +699,11 @@ int RAND_pseudo_bytes(unsigned char *buf,int num);
#define bn_check_top(a) \
do { \
const BIGNUM *_bnum2 = (a); \
- assert((_bnum2->top == 0) || \
+ if (_bnum2 != NULL) { \
+ assert((_bnum2->top == 0) || \
(_bnum2->d[_bnum2->top - 1] != 0)); \
- bn_pollute(_bnum2); \
+ bn_pollute(_bnum2); \
+ } \
} while(0)
#define bn_fix_top(a) bn_check_top(a)