summaryrefslogtreecommitdiffstats
path: root/payloads
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2023-01-22 08:55:59 +0100
committerFelix Singer <felixsinger@posteo.net>2023-02-17 16:19:44 +0000
commit5331462e9efa44a8ea433e41b941b3ea663424e2 (patch)
tree296bceaedcc679ee56a89bfbb24f06097641ee2c /payloads
parentb06ba874fbda1cd6a68f328d6813f0e423c75b66 (diff)
downloadcoreboot-5331462e9efa44a8ea433e41b941b3ea663424e2.tar.gz
coreboot-5331462e9efa44a8ea433e41b941b3ea663424e2.tar.bz2
coreboot-5331462e9efa44a8ea433e41b941b3ea663424e2.zip
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>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/include/assert.h2
-rw-r--r--payloads/libpayload/include/die.h2
-rw-r--r--payloads/libpayload/include/stdlib.h4
3 files changed, 4 insertions, 4 deletions
diff --git a/payloads/libpayload/include/assert.h b/payloads/libpayload/include/assert.h
index 2152af4f7ac0..6b4770b343b5 100644
--- a/payloads/libpayload/include/assert.h
+++ b/payloads/libpayload/include/assert.h
@@ -50,7 +50,7 @@ void mock_assert(const int result, const char *const expression, const char *con
if ((statement) == 0) { \
fprintf(stderr, "assertion failed in file %s, " \
"function %s(), line %d\n", \
- __FILE__, __FUNCTION__, __LINE__); \
+ __FILE__, __func__, __LINE__); \
abort(); \
}
#endif
diff --git a/payloads/libpayload/include/die.h b/payloads/libpayload/include/die.h
index c7a6e92d044f..01469de17ace 100644
--- a/payloads/libpayload/include/die.h
+++ b/payloads/libpayload/include/die.h
@@ -35,7 +35,7 @@ void die_work(const char *file, const char *func, const int line,
__attribute__((noreturn));
#define die(fmt, args...) \
- do { die_work(__FILE__, __FUNCTION__, __LINE__, fmt, ##args); } \
+ do { die_work(__FILE__, __func__, __LINE__, fmt, ##args); } \
while (0)
#define die_if(condition, fmt, args...) \
diff --git a/payloads/libpayload/include/stdlib.h b/payloads/libpayload/include/stdlib.h
index ac386c1fa2ad..e129cd10d43b 100644
--- a/payloads/libpayload/include/stdlib.h
+++ b/payloads/libpayload/include/stdlib.h
@@ -148,7 +148,7 @@ static inline void *xmalloc_work(size_t size, const char *file,
}
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,
const char *func, int line)
@@ -157,7 +157,7 @@ static inline void *xzalloc_work(size_t size, const char *file,
memset(ret, 0, size);
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,
const char *func, int line)