summaryrefslogtreecommitdiffstats
path: root/libc/include/malloc.h
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-06-13 15:43:14 -0700
committerNick Kralevich <nnk@google.com>2012-06-13 15:43:14 -0700
commitb27631b9aee760034ea4aecc5c052e880292c417 (patch)
treede164c8c7dda506f635464d2838d99b0a9df78e4 /libc/include/malloc.h
parentc2f1d215b1786520fa8c371caa97f062e0bfb513 (diff)
downloadbionic-b27631b9aee760034ea4aecc5c052e880292c417.zip
bionic-b27631b9aee760034ea4aecc5c052e880292c417.tar.gz
bionic-b27631b9aee760034ea4aecc5c052e880292c417.tar.bz2
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
Diffstat (limited to 'libc/include/malloc.h')
-rw-r--r--libc/include/malloc.h2
1 files changed, 1 insertions, 1 deletions
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);