Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-04-22 20:50:28 +0300
committerAdam Langley <agl@google.com>2015-05-05 02:05:17 +0300
commit22ccc2d8f1e0a3d19b98324d502322db8d89624f (patch)
tree634d6618b5a8d25cbddb5e080840f09a58657027 /crypto/bn/ctx.c
parentde95d262ab448f8582b8192c3a94e9c10acdb771 (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.c8
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;
}