[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subject: [PATCH] explicit cast to char*


From 80933a4a6962c269ca1a6f9804498716789d219b Mon Sep 17 00:00:00 2001
From: noppel <noppel@xxxxxxxxxxxxx>
Date: Wed, 8 Mar 2017 09:22:23 +0100
Subject: [PATCH] explicit cast to char*

---
 src/cmocka.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/cmocka.c b/src/cmocka.c
index b91dd65..f66e569 100644
--- a/src/cmocka.c
+++ b/src/cmocka.c
@@ -1783,7 +1783,7 @@ static void vcm_print_error(const char* const format, va_list args)
     if (cm_error_message == NULL) {
         /* CREATE MESSAGE */

-        cm_error_message = libc_malloc(len + 1);
+        cm_error_message = (char*)libc_malloc(len + 1);
         if (cm_error_message == NULL) {
             /* TODO */
             goto end;
@@ -1793,7 +1793,7 @@ static void vcm_print_error(const char* const format, va_list args)
         char *tmp;

         msg_len = strlen(cm_error_message);
-        tmp = libc_realloc(cm_error_message, msg_len + len + 1);
+        tmp = (char*)libc_realloc(cm_error_message, msg_len + len + 1);
         if (tmp == NULL) {
             goto end;
         }
--
2.6.1.windows.1



--
Maximilian Noppel
mail: max@noppelmax.online
phone: 0049 176 31 64 26 95
fingerprint: DD94 3459 76C0 77D8 412E  D6FC 3A67 589C 3404 C1F9


Follow-Ups:
Re: Subject: [PATCH] explicit cast to char*Emil Velikov <emil.l.velikov@xxxxxxxxx>
Re: Subject: [PATCH] explicit cast to char*Andreas Schneider <asn@xxxxxxxxxxxxxx>