libpayload: Use __func__ instead of old __FUNCTION__
Change-Id: Ic3c22ac101a2ff44f97b2ac3fe3c0a89391718de Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/72380 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
This commit is contained in:
parent
b06ba874fb
commit
5331462e9e
|
@ -50,7 +50,7 @@ void mock_assert(const int result, const char *const expression, const char *con
|
||||||
if ((statement) == 0) { \
|
if ((statement) == 0) { \
|
||||||
fprintf(stderr, "assertion failed in file %s, " \
|
fprintf(stderr, "assertion failed in file %s, " \
|
||||||
"function %s(), line %d\n", \
|
"function %s(), line %d\n", \
|
||||||
__FILE__, __FUNCTION__, __LINE__); \
|
__FILE__, __func__, __LINE__); \
|
||||||
abort(); \
|
abort(); \
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,7 +35,7 @@ void die_work(const char *file, const char *func, const int line,
|
||||||
__attribute__((noreturn));
|
__attribute__((noreturn));
|
||||||
|
|
||||||
#define die(fmt, args...) \
|
#define die(fmt, args...) \
|
||||||
do { die_work(__FILE__, __FUNCTION__, __LINE__, fmt, ##args); } \
|
do { die_work(__FILE__, __func__, __LINE__, fmt, ##args); } \
|
||||||
while (0)
|
while (0)
|
||||||
|
|
||||||
#define die_if(condition, fmt, args...) \
|
#define die_if(condition, fmt, args...) \
|
||||||
|
|
|
@ -148,7 +148,7 @@ static inline void *xmalloc_work(size_t size, const char *file,
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#define xmalloc(size) xmalloc_work((size), __FILE__, __FUNCTION__, __LINE__)
|
#define xmalloc(size) xmalloc_work((size), __FILE__, __func__, __LINE__)
|
||||||
|
|
||||||
static inline void *xzalloc_work(size_t size, const char *file,
|
static inline void *xzalloc_work(size_t size, const char *file,
|
||||||
const char *func, int line)
|
const char *func, int line)
|
||||||
|
@ -157,7 +157,7 @@ static inline void *xzalloc_work(size_t size, const char *file,
|
||||||
memset(ret, 0, size);
|
memset(ret, 0, size);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#define xzalloc(size) xzalloc_work((size), __FILE__, __FUNCTION__, __LINE__)
|
#define xzalloc(size) xzalloc_work((size), __FILE__, __func__, __LINE__)
|
||||||
|
|
||||||
static inline void *xmemalign_work(size_t align, size_t size, const char *file,
|
static inline void *xmemalign_work(size_t align, size_t size, const char *file,
|
||||||
const char *func, int line)
|
const char *func, int line)
|
||||||
|
|
Loading…
Reference in New Issue