diff options
| author | deraadt <> | 2014-06-07 14:41:57 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-06-07 14:41:57 +0000 |
| commit | 800fbde652d67326eeb163d56d8f72ebb239b3c4 (patch) | |
| tree | c0956c22011ba4358ae4ab650adf0e744f93f40c /src/lib/libcrypto/store | |
| parent | 99e1482c930054f5a075761b96ee19aa8e1a4596 (diff) | |
| download | openbsd-800fbde652d67326eeb163d56d8f72ebb239b3c4.tar.gz openbsd-800fbde652d67326eeb163d56d8f72ebb239b3c4.tar.bz2 openbsd-800fbde652d67326eeb163d56d8f72ebb239b3c4.zip | |
malloc() result does not need a cast.
ok miod
Diffstat (limited to 'src/lib/libcrypto/store')
| -rw-r--r-- | src/lib/libcrypto/store/str_lib.c | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/store/str_mem.c | 3 |
2 files changed, 5 insertions, 5 deletions
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) | |||
| 109 | return NULL; | 109 | return NULL; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | ret = (STORE *)malloc(sizeof(STORE)); | 112 | ret = malloc(sizeof(STORE)); |
| 113 | if (ret == NULL) { | 113 | if (ret == NULL) { |
| 114 | STOREerr(STORE_F_STORE_NEW_METHOD, ERR_R_MALLOC_FAILURE); | 114 | STOREerr(STORE_F_STORE_NEW_METHOD, ERR_R_MALLOC_FAILURE); |
| 115 | return NULL; | 115 | return NULL; |
| @@ -1226,7 +1226,7 @@ struct STORE_attr_info_st { | |||
| 1226 | STORE_ATTR_INFO * | 1226 | STORE_ATTR_INFO * |
| 1227 | STORE_ATTR_INFO_new(void) | 1227 | STORE_ATTR_INFO_new(void) |
| 1228 | { | 1228 | { |
| 1229 | return (STORE_ATTR_INFO *)malloc(sizeof(STORE_ATTR_INFO)); | 1229 | return malloc(sizeof(STORE_ATTR_INFO)); |
| 1230 | } | 1230 | } |
| 1231 | 1231 | ||
| 1232 | static void | 1232 | static void |
| @@ -1489,7 +1489,8 @@ STORE_parse_attrs_start(OPENSSL_ITEM *attributes) | |||
| 1489 | { | 1489 | { |
| 1490 | if (attributes) { | 1490 | if (attributes) { |
| 1491 | struct attr_list_ctx_st *context = | 1491 | struct attr_list_ctx_st *context = |
| 1492 | (struct attr_list_ctx_st *)malloc(sizeof(struct attr_list_ctx_st)); | 1492 | malloc(sizeof(struct attr_list_ctx_st)); |
| 1493 | |||
| 1493 | if (context) | 1494 | if (context) |
| 1494 | context->attributes = attributes; | 1495 | context->attributes = attributes; |
| 1495 | else | 1496 | else |
diff --git a/src/lib/libcrypto/store/str_mem.c b/src/lib/libcrypto/store/str_mem.c index 0409fd198d..d59799196a 100644 --- a/src/lib/libcrypto/store/str_mem.c +++ b/src/lib/libcrypto/store/str_mem.c | |||
| @@ -224,8 +224,7 @@ static void * | |||
| 224 | mem_list_start(STORE *s, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[], | 224 | mem_list_start(STORE *s, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[], |
| 225 | OPENSSL_ITEM parameters[]) | 225 | OPENSSL_ITEM parameters[]) |
| 226 | { | 226 | { |
| 227 | struct mem_ctx_st *context = | 227 | struct mem_ctx_st *context = malloc(sizeof(struct mem_ctx_st)); |
| 228 | (struct mem_ctx_st *)malloc(sizeof(struct mem_ctx_st)); | ||
| 229 | void *attribute_context = NULL; | 228 | void *attribute_context = NULL; |
| 230 | STORE_ATTR_INFO *attrs = NULL; | 229 | STORE_ATTR_INFO *attrs = NULL; |
| 231 | 230 | ||
