mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 12:28:11 +02:00
std-aux: add static-asserts about signedness for NM_CMP_DIRECT()
This commit is contained in:
parent
f27bf0b9ea
commit
5fe6b63a62
1 changed files with 9 additions and 7 deletions
|
|
@ -1307,6 +1307,8 @@ nm_ptr_to_uintptr(const void *p)
|
||||||
typeof(a) _a = (a); \
|
typeof(a) _a = (a); \
|
||||||
typeof(b) _b = (b); \
|
typeof(b) _b = (b); \
|
||||||
\
|
\
|
||||||
|
G_STATIC_ASSERT(_NM_INT_SAME_SIGNEDNESS(_a, _b)); \
|
||||||
|
\
|
||||||
if (_a != _b) \
|
if (_a != _b) \
|
||||||
return (_a < _b) ? -1 : 1; \
|
return (_a < _b) ? -1 : 1; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue