From 3a107841bbefe8f09c3763736f0485c9369c13dd Mon Sep 17 00:00:00 2001 From: TLINDEN Date: Thu, 19 Dec 2013 12:31:04 +0100 Subject: [PATCH] fixed casts in alternate functions. --- include/pcp/platform.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pcp/platform.h b/include/pcp/platform.h index b92bd19..bfb8d57 100644 --- a/include/pcp/platform.h +++ b/include/pcp/platform.h @@ -72,7 +72,7 @@ static inline u_int32_t arc4random() { } static inline void arc4random_buf(void *buf, size_t nbytes) { - randombytes(buf, nbytes); + randombytes((unsigned char*)buf, nbytes); } @@ -119,7 +119,7 @@ int vasprintf(char **ret, const char *format, va_list args) { int count = vsnprintf(NULL, 0, format, args); if (count >= 0) { - char* buffer = malloc(count + 1); + char* buffer = (char *)malloc(count + 1); if (buffer != NULL) { count = vsnprintf(buffer, count + 1, format, copy); if (count < 0)