From 59a4cbf0543109e6c430d2676766f88349f405ce Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 17 Apr 2014 10:56:25 +0000 Subject: [PATCH] remove duplicated tests in if statements ok krw@ sthen@ deraadt@ --- lib/libcrypto/store/str_lib.c | 8 ++++---- lib/libssl/src/crypto/store/str_lib.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/libcrypto/store/str_lib.c b/lib/libcrypto/store/str_lib.c index f1dbcbd0e0c..e92dc1f51c2 100644 --- a/lib/libcrypto/store/str_lib.c +++ b/lib/libcrypto/store/str_lib.c @@ -472,7 +472,7 @@ EVP_PKEY *STORE_get_private_key(STORE *s, OPENSSL_ITEM attributes[], object = s->meth->get_object(s, STORE_OBJECT_TYPE_PRIVATE_KEY, attributes, parameters); - if (!object || !object->data.key || !object->data.key) + if (!object || !object->data.key) { STOREerr(STORE_F_STORE_GET_PRIVATE_KEY, STORE_R_FAILED_GETTING_KEY); @@ -613,7 +613,7 @@ EVP_PKEY *STORE_list_private_key_next(STORE *s, void *handle) list_object_next,STORE_R_NO_LIST_OBJECT_NEXT_FUNCTION); object = s->meth->list_object_next(s, handle); - if (!object || !object->data.key || !object->data.key) + if (!object || !object->data.key) { STOREerr(STORE_F_STORE_LIST_PRIVATE_KEY_NEXT, STORE_R_FAILED_LISTING_KEYS); @@ -667,7 +667,7 @@ EVP_PKEY *STORE_get_public_key(STORE *s, OPENSSL_ITEM attributes[], object = s->meth->get_object(s, STORE_OBJECT_TYPE_PUBLIC_KEY, attributes, parameters); - if (!object || !object->data.key || !object->data.key) + if (!object || !object->data.key) { STOREerr(STORE_F_STORE_GET_PUBLIC_KEY, STORE_R_FAILED_GETTING_KEY); @@ -808,7 +808,7 @@ EVP_PKEY *STORE_list_public_key_next(STORE *s, void *handle) list_object_next,STORE_R_NO_LIST_OBJECT_NEXT_FUNCTION); object = s->meth->list_object_next(s, handle); - if (!object || !object->data.key || !object->data.key) + if (!object || !object->data.key) { STOREerr(STORE_F_STORE_LIST_PUBLIC_KEY_NEXT, STORE_R_FAILED_LISTING_KEYS); diff --git a/lib/libssl/src/crypto/store/str_lib.c b/lib/libssl/src/crypto/store/str_lib.c index f1dbcbd0e0c..e92dc1f51c2 100644 --- a/lib/libssl/src/crypto/store/str_lib.c +++ b/lib/libssl/src/crypto/store/str_lib.c @@ -472,7 +472,7 @@ EVP_PKEY *STORE_get_private_key(STORE *s, OPENSSL_ITEM attributes[], object = s->meth->get_object(s, STORE_OBJECT_TYPE_PRIVATE_KEY, attributes, parameters); - if (!object || !object->data.key || !object->data.key) + if (!object || !object->data.key) { STOREerr(STORE_F_STORE_GET_PRIVATE_KEY, STORE_R_FAILED_GETTING_KEY); @@ -613,7 +613,7 @@ EVP_PKEY *STORE_list_private_key_next(STORE *s, void *handle) list_object_next,STORE_R_NO_LIST_OBJECT_NEXT_FUNCTION); object = s->meth->list_object_next(s, handle); - if (!object || !object->data.key || !object->data.key) + if (!object || !object->data.key) { STOREerr(STORE_F_STORE_LIST_PRIVATE_KEY_NEXT, STORE_R_FAILED_LISTING_KEYS); @@ -667,7 +667,7 @@ EVP_PKEY *STORE_get_public_key(STORE *s, OPENSSL_ITEM attributes[], object = s->meth->get_object(s, STORE_OBJECT_TYPE_PUBLIC_KEY, attributes, parameters); - if (!object || !object->data.key || !object->data.key) + if (!object || !object->data.key) { STOREerr(STORE_F_STORE_GET_PUBLIC_KEY, STORE_R_FAILED_GETTING_KEY); @@ -808,7 +808,7 @@ EVP_PKEY *STORE_list_public_key_next(STORE *s, void *handle) list_object_next,STORE_R_NO_LIST_OBJECT_NEXT_FUNCTION); object = s->meth->list_object_next(s, handle); - if (!object || !object->data.key || !object->data.key) + if (!object || !object->data.key) { STOREerr(STORE_F_STORE_LIST_PUBLIC_KEY_NEXT, STORE_R_FAILED_LISTING_KEYS); -- 2.20.1