diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-29 23:18:16 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-02-29 23:18:16 -0500 |
commit | 6014237390d5d9a20a274d4fcd9c84669cacca83 (patch) | |
tree | 5c676e1d5850f389968c222cc02715bf8303d96a /src/basic/macro.h | |
parent | 97a437d24cc97bc7132d3d3696b4c41e5a93edca (diff) | |
parent | 35aa04e9edf422beac3493afa555d29575b3046c (diff) |
Merge pull request #2702 from poettering/resolved-iterate-fix
resolved iteration fix
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r-- | src/basic/macro.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index ddf0968d1b..c34441d75d 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -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 |