vppinfra: add CLIB_SWAP()
Type: improvement Change-Id: I1911a9d6a0ca8e1d24ce7b95281886392081ffc6 Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:

committed by
Florin Coras

parent
4089d7cf1b
commit
ea4a5499ae
@ -106,6 +106,13 @@
|
||||
#define CLIB_STRING_ARRAY(...) \
|
||||
(char *[]) { __VA_ARGS__, 0 }
|
||||
|
||||
#define CLIB_SWAP(a, b) \
|
||||
{ \
|
||||
typeof (a) __tmp = a; \
|
||||
a = b; \
|
||||
b = __tmp; \
|
||||
}
|
||||
|
||||
/* sanitizers */
|
||||
#ifdef __has_feature
|
||||
#if __has_feature(address_sanitizer)
|
||||
|
Reference in New Issue
Block a user