diff options
Diffstat (limited to 'crypto/store')
-rw-r--r-- | crypto/store/str_lib.c | 26 | ||||
-rw-r--r-- | crypto/store/str_mem.c | 4 | ||||
-rw-r--r-- | crypto/store/str_meth.c | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/crypto/store/str_lib.c b/crypto/store/str_lib.c index 1b554c3f56..c2e6b8e8d1 100644 --- a/crypto/store/str_lib.c +++ b/crypto/store/str_lib.c @@ -270,7 +270,7 @@ int STORE_store_certificate(STORE *s, X509 *data, OPENSSL_ITEM attributes[], store_object, STORE_R_NO_STORE_OBJECT_FUNCTION); object = STORE_OBJECT_new(); - if (!object) { + if (object == NULL) { STOREerr(STORE_F_STORE_STORE_CERTIFICATE, ERR_R_MALLOC_FAILURE); return 0; } @@ -471,12 +471,12 @@ int STORE_store_private_key(STORE *s, EVP_PKEY *data, store_object, STORE_R_NO_STORE_OBJECT_FUNCTION); object = STORE_OBJECT_new(); - if (!object) { + if (object == NULL) { STOREerr(STORE_F_STORE_STORE_PRIVATE_KEY, ERR_R_MALLOC_FAILURE); return 0; } object->data.key = EVP_PKEY_new(); - if (!object->data.key) { + if (object->data.key == NULL) { STOREerr(STORE_F_STORE_STORE_PRIVATE_KEY, ERR_R_MALLOC_FAILURE); return 0; } @@ -655,12 +655,12 @@ int STORE_store_public_key(STORE *s, EVP_PKEY *data, store_object, STORE_R_NO_STORE_OBJECT_FUNCTION); object = STORE_OBJECT_new(); - if (!object) { + if (object == NULL) { STOREerr(STORE_F_STORE_STORE_PUBLIC_KEY, ERR_R_MALLOC_FAILURE); return 0; } object->data.key = EVP_PKEY_new(); - if (!object->data.key) { + if (object->data.key == NULL) { STOREerr(STORE_F_STORE_STORE_PUBLIC_KEY, ERR_R_MALLOC_FAILURE); return 0; } @@ -862,7 +862,7 @@ int STORE_store_crl(STORE *s, X509_CRL *data, OPENSSL_ITEM attributes[], store_object, STORE_R_NO_STORE_OBJECT_FUNCTION); object = STORE_OBJECT_new(); - if (!object) { + if (object == NULL) { STOREerr(STORE_F_STORE_STORE_CRL, ERR_R_MALLOC_FAILURE); return 0; } @@ -991,7 +991,7 @@ int STORE_store_number(STORE *s, BIGNUM *data, OPENSSL_ITEM attributes[], store_object, STORE_R_NO_STORE_OBJECT_NUMBER_FUNCTION); object = STORE_OBJECT_new(); - if (!object) { + if (object == NULL) { STOREerr(STORE_F_STORE_STORE_NUMBER, ERR_R_MALLOC_FAILURE); return 0; } @@ -1075,7 +1075,7 @@ int STORE_store_arbitrary(STORE *s, BUF_MEM *data, OPENSSL_ITEM attributes[], store_object, STORE_R_NO_STORE_OBJECT_ARBITRARY_FUNCTION); object = STORE_OBJECT_new(); - if (!object) { + if (object == NULL) { STOREerr(STORE_F_STORE_STORE_ARBITRARY, ERR_R_MALLOC_FAILURE); return 0; } @@ -1449,7 +1449,7 @@ void *STORE_parse_attrs_start(OPENSSL_ITEM *attributes) { if (attributes) { struct attr_list_ctx_st *context = OPENSSL_malloc(sizeof(*context)); - if (context) + if (context != NULL) context->attributes = attributes; else STOREerr(STORE_F_STORE_PARSE_ATTRS_START, ERR_R_MALLOC_FAILURE); @@ -1473,7 +1473,7 @@ STORE_ATTR_INFO *STORE_parse_attrs_next(void *handle) case STORE_ATTR_FRIENDLYNAME: case STORE_ATTR_EMAIL: case STORE_ATTR_FILENAME: - if (!attrs) + if (attrs == NULL) attrs = STORE_ATTR_INFO_new(); if (attrs == NULL) { STOREerr(STORE_F_STORE_PARSE_ATTRS_NEXT, @@ -1490,7 +1490,7 @@ STORE_ATTR_INFO *STORE_parse_attrs_next(void *handle) case STORE_ATTR_SUBJECTKEYID: case STORE_ATTR_ISSUERSERIALHASH: case STORE_ATTR_CERTHASH: - if (!attrs) + if (attrs == NULL) attrs = STORE_ATTR_INFO_new(); if (attrs == NULL) { STOREerr(STORE_F_STORE_PARSE_ATTRS_NEXT, @@ -1504,7 +1504,7 @@ STORE_ATTR_INFO *STORE_parse_attrs_next(void *handle) break; case STORE_ATTR_ISSUER: case STORE_ATTR_SUBJECT: - if (!attrs) + if (attrs == NULL) attrs = STORE_ATTR_INFO_new(); if (attrs == NULL) { STOREerr(STORE_F_STORE_PARSE_ATTRS_NEXT, @@ -1516,7 +1516,7 @@ STORE_ATTR_INFO *STORE_parse_attrs_next(void *handle) context->attributes->value); break; case STORE_ATTR_SERIAL: - if (!attrs) + if (attrs == NULL) attrs = STORE_ATTR_INFO_new(); if (attrs == NULL) { STOREerr(STORE_F_STORE_PARSE_ATTRS_NEXT, diff --git a/crypto/store/str_mem.c b/crypto/store/str_mem.c index 1736f7903f..add76e718a 100644 --- a/crypto/store/str_mem.c +++ b/crypto/store/str_mem.c @@ -248,7 +248,7 @@ static void *mem_list_start(STORE *s, STORE_OBJECT_TYPES type, void *attribute_context = NULL; STORE_ATTR_INFO *attrs = NULL; - if (!context) { + if (context == NULL) { STOREerr(STORE_F_MEM_LIST_START, ERR_R_MALLOC_FAILURE); return 0; } @@ -263,7 +263,7 @@ static void *mem_list_start(STORE *s, STORE_OBJECT_TYPES type, if (context->search_attributes == NULL) { context->search_attributes = sk_STORE_ATTR_INFO_new(STORE_ATTR_INFO_compare); - if (!context->search_attributes) { + if (context->search_attributes == NULL) { STOREerr(STORE_F_MEM_LIST_START, ERR_R_MALLOC_FAILURE); goto err; } diff --git a/crypto/store/str_meth.c b/crypto/store/str_meth.c index c030198841..f9ce8bb4e7 100644 --- a/crypto/store/str_meth.c +++ b/crypto/store/str_meth.c @@ -65,7 +65,7 @@ STORE_METHOD *STORE_create_method(char *name) { STORE_METHOD *store_method = OPENSSL_zalloc(sizeof(*store_method)); - if (store_method) + if (store_method != NULL) store_method->name = BUF_strdup(name); return store_method; } |