From cfec3117d42a1e44feb76a13dc07be2b2e9799ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 17 Jul 2019 12:27:33 +0200 Subject: [PATCH] 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 --- src/basic/macro.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/basic/macro.h b/src/basic/macro.h index 81add201fab..fb002d2172f 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -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) \ -- 2.47.3