mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
basic/macro: drop do {} while(0) from assert_not_reached
log_assert_failed_unreachable is just a normal function call, no need to wrap it. https://github.com/systemd/systemd/issues/12997#issuecomment-510103988
This commit is contained in:
@@ -344,9 +344,7 @@ static inline int __coverity_check__(int condition) {
|
||||
#endif
|
||||
|
||||
#define assert_not_reached(t) \
|
||||
do { \
|
||||
log_assert_failed_unreachable(t, PROJECT_FILE, __LINE__, __PRETTY_FUNCTION__); \
|
||||
} while (false)
|
||||
log_assert_failed_unreachable(t, PROJECT_FILE, __LINE__, __PRETTY_FUNCTION__)
|
||||
|
||||
#if defined(static_assert)
|
||||
#define assert_cc(expr) \
|
||||
|
||||
Reference in New Issue
Block a user