From b27631b9aee760034ea4aecc5c052e880292c417 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Wed, 13 Jun 2012 15:43:14 -0700 Subject: Don't mark realloc with __attribute__((malloc)) According to http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html realloc should NOT be marked with __attribute__((malloc)). Quoting: realloc-like functions do not have this property as the memory pointed to does not have undefined content. For reference, __mallocfunc is defined in sys/cdefs.h as: #define __mallocfunc __attribute__((malloc)) Change-Id: I56083542ba92e4608dd7c55fb5596a138eb50cc9 --- libc/include/malloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/include/malloc.h') diff --git a/libc/include/malloc.h b/libc/include/malloc.h index a864286..bcea672 100644 --- a/libc/include/malloc.h +++ b/libc/include/malloc.h @@ -35,7 +35,7 @@ __BEGIN_DECLS extern __mallocfunc void* malloc(size_t); extern __mallocfunc void* calloc(size_t, size_t); -extern __mallocfunc void* realloc(void *, size_t); +extern void* realloc(void *, size_t); extern void free(void *); extern void* memalign(size_t alignment, size_t bytesize); -- cgit v1.1