mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
malloc.h: be a bit more consistent with macro definitions
Currrently, malloc and free are function-like macros, while calloc, realloc and memalign are object-like macros. Usually, this doesn't matter, but it does when the identifiers appear without a following open parenthesis, such as when their address is taken for building the export table. Adding calloc or realloc to that table breaks the build on sandbox due to this inconsistency. Signed-off-by: Rasmus Villemoes <ravi@prevas.dk> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
committed by
Tom Rini
parent
ecced05f67
commit
e54bf98c3a
@@ -904,11 +904,11 @@ void *realloc_simple(void *ptr, size_t size);
|
|||||||
# define mALLOPt dlmallopt
|
# define mALLOPt dlmallopt
|
||||||
|
|
||||||
/* Ensure that U-Boot actually uses these too */
|
/* Ensure that U-Boot actually uses these too */
|
||||||
#define calloc dlcalloc
|
#define calloc(x,y) dlcalloc(x,y)
|
||||||
#define free(ptr) dlfree(ptr)
|
#define free(ptr) dlfree(ptr)
|
||||||
#define malloc(x) dlmalloc(x)
|
#define malloc(x) dlmalloc(x)
|
||||||
#define memalign dlmemalign
|
#define memalign(a,x) dlmemalign(a,x)
|
||||||
#define realloc dlrealloc
|
#define realloc(p,x) dlrealloc(p,x)
|
||||||
#define valloc dlvalloc
|
#define valloc dlvalloc
|
||||||
#define pvalloc dlpvalloc
|
#define pvalloc dlpvalloc
|
||||||
#define mallinfo() dlmallinfo()
|
#define mallinfo() dlmallinfo()
|
||||||
|
|||||||
Reference in New Issue
Block a user