diff options
Diffstat (limited to 'src/systemd/src/basic/macro.h')
-rw-r--r-- | src/systemd/src/basic/macro.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/systemd/src/basic/macro.h b/src/systemd/src/basic/macro.h index 2695d0edb7..c34441d75d 100644 --- a/src/systemd/src/basic/macro.h +++ b/src/systemd/src/basic/macro.h @@ -224,7 +224,7 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { /* We override the glibc assert() here. */ #undef assert #ifdef NDEBUG -#define assert(expr) do {} while(false) +#define assert(expr) do {} while (false) #else #define assert(expr) assert_message_se(expr, #expr) #endif @@ -361,6 +361,12 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { _found; \ }) +#define SWAP_TWO(x, y) do { \ + typeof(x) _t = (x); \ + (x) = (y); \ + (y) = (_t); \ + } while (false) + /* Define C11 thread_local attribute even on older gcc compiler * version */ #ifndef thread_local |