diff options
author | David Benjamin <davidben@chromium.org> | 2015-04-22 20:50:28 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-05 02:05:17 +0300 |
commit | 22ccc2d8f1e0a3d19b98324d502322db8d89624f (patch) | |
tree | 634d6618b5a8d25cbddb5e080840f09a58657027 /crypto/bn/ctx.c | |
parent | de95d262ab448f8582b8192c3a94e9c10acdb771 (diff) |
Remove unnecessary NULL checks, part 1.
First batch of the alphabet.
Change-Id: If4e60f4fbb69e04eb4b70aa1b2240e329251bfa5
Reviewed-on: https://boringssl-review.googlesource.com/4514
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bn/ctx.c')
-rw-r--r-- | crypto/bn/ctx.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/bn/ctx.c b/crypto/bn/ctx.c index e3a5c928..05783762 100644 --- a/crypto/bn/ctx.c +++ b/crypto/bn/ctx.c @@ -205,9 +205,7 @@ static void BN_STACK_init(BN_STACK *st) { } static void BN_STACK_finish(BN_STACK *st) { - if (st->size) { - OPENSSL_free(st->indexes); - } + OPENSSL_free(st->indexes); } static int BN_STACK_push(BN_STACK *st, unsigned int idx) { @@ -222,9 +220,7 @@ static int BN_STACK_push(BN_STACK *st, unsigned int idx) { if (st->depth) { memcpy(newitems, st->indexes, st->depth * sizeof(unsigned int)); } - if (st->size) { - OPENSSL_free(st->indexes); - } + OPENSSL_free(st->indexes); st->indexes = newitems; st->size = newsize; } |