~emersion/public-inbox

Use __func__ instead of __PRETTY_FUNCTION__ v1 SUPERSEDED

Ismael Luceno: 1
 Use __func__ instead of __PRETTY_FUNCTION__

 1 files changed, 3 insertions(+), 3 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/public-inbox/patches/37509/mbox | git am -3
Learn more about email & git

[PATCH] Use __func__ instead of __PRETTY_FUNCTION__ Export this patch

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---
 src/basic/macro.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/basic/macro.h b/src/basic/macro.h
index 84817b4132ba..ae5f45db4700 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -205,12 +205,12 @@ static inline int __coverity_check__(int condition) {
#define assert_message_se(expr, message)                                \
        do {                                                            \
                if (_unlikely_(!(expr)))                                \
                        log_assert_failed(message, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
                        log_assert_failed(message, __FILE__, __LINE__, __func__); \
        } while (false)

#define assert_log(expr, message) ((_likely_(expr))                     \
        ? (true)                                                        \
        : (log_assert_failed_return(message, __FILE__, __LINE__, __PRETTY_FUNCTION__), false))
        : (log_assert_failed_return(message, __FILE__, __LINE__, __func__), false))

#endif  /* __COVERITY__ */

@@ -226,7 +226,7 @@ static inline int __coverity_check__(int condition) {

#define assert_not_reached(t)                                           \
        do {                                                            \
                log_assert_failed_unreachable(t, __FILE__, __LINE__, __PRETTY_FUNCTION__); \
                log_assert_failed_unreachable(t, __FILE__, __LINE__, __func__); \
        } while (false)

#define assert_cc(expr)                                                 \
-- 
2.38.1