summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/crypto/ui/ui_lib.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-06-07 14:41:56 +0000
committerderaadt <deraadt@openbsd.org>2014-06-07 14:41:56 +0000
commit4163340b499b485e883e0fa2e5cb8184fd8c0a18 (patch)
tree0c44f8a082e5dc6c4f9d0af733243d1a96651790 /lib/libssl/src/crypto/ui/ui_lib.c
parentRemove another NULL check before a BIO_free(). (diff)
downloadwireguard-openbsd-4163340b499b485e883e0fa2e5cb8184fd8c0a18.tar.xz
wireguard-openbsd-4163340b499b485e883e0fa2e5cb8184fd8c0a18.zip
malloc() result does not need a cast.
ok miod
Diffstat (limited to 'lib/libssl/src/crypto/ui/ui_lib.c')
-rw-r--r--lib/libssl/src/crypto/ui/ui_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/ui/ui_lib.c b/lib/libssl/src/crypto/ui/ui_lib.c
index ff548f4bb8d..e23f19a838b 100644
--- a/lib/libssl/src/crypto/ui/ui_lib.c
+++ b/lib/libssl/src/crypto/ui/ui_lib.c
@@ -80,7 +80,7 @@ UI_new_method(const UI_METHOD *method)
{
UI *ret;
- ret = (UI *) malloc(sizeof(UI));
+ ret = malloc(sizeof(UI));
if (ret == NULL) {
UIerr(UI_F_UI_NEW_METHOD, ERR_R_MALLOC_FAILURE);
return NULL;
@@ -149,7 +149,7 @@ general_allocate_prompt(UI *ui, const char *prompt, int prompt_freeable,
} else if ((type == UIT_PROMPT || type == UIT_VERIFY ||
type == UIT_BOOLEAN) && result_buf == NULL) {
UIerr(UI_F_GENERAL_ALLOCATE_PROMPT, UI_R_NO_RESULT_BUFFER);
- } else if ((ret = (UI_STRING *) malloc(sizeof(UI_STRING)))) {
+ } else if ((ret = malloc(sizeof(UI_STRING)))) {
ret->out_string = prompt;
ret->flags = prompt_freeable ? OUT_STRING_FREEABLE : 0;
ret->input_flags = input_flags;