From 6e812251158ecbc0733dba21489ebce1248ebb33 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 7 Jun 2014 14:41:57 +0000 Subject: malloc() result does not need a cast. ok miod --- src/lib/libcrypto/store/str_lib.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/lib/libcrypto/store/str_lib.c') diff --git a/src/lib/libcrypto/store/str_lib.c b/src/lib/libcrypto/store/str_lib.c index c50620308a..0f88664acd 100644 --- a/src/lib/libcrypto/store/str_lib.c +++ b/src/lib/libcrypto/store/str_lib.c @@ -109,7 +109,7 @@ STORE_new_method(const STORE_METHOD *method) return NULL; } - ret = (STORE *)malloc(sizeof(STORE)); + ret = malloc(sizeof(STORE)); if (ret == NULL) { STOREerr(STORE_F_STORE_NEW_METHOD, ERR_R_MALLOC_FAILURE); return NULL; @@ -1226,7 +1226,7 @@ struct STORE_attr_info_st { STORE_ATTR_INFO * STORE_ATTR_INFO_new(void) { - return (STORE_ATTR_INFO *)malloc(sizeof(STORE_ATTR_INFO)); + return malloc(sizeof(STORE_ATTR_INFO)); } static void @@ -1489,7 +1489,8 @@ STORE_parse_attrs_start(OPENSSL_ITEM *attributes) { if (attributes) { struct attr_list_ctx_st *context = - (struct attr_list_ctx_st *)malloc(sizeof(struct attr_list_ctx_st)); + malloc(sizeof(struct attr_list_ctx_st)); + if (context) context->attributes = attributes; else -- cgit v1.2.3-55-g6feb