mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 20:50:32 +01:00
shared: fix typecheck in NM_PTRARRAY_LEN()
Previously, NM_PTRARRAY_LEN() would not work if the pointer type is an opaque type, which is common. For example: NMConnection *const*connections = ...;
This commit is contained in:
parent
39ab38a04d
commit
f7b2ebc87a
1 changed files with 2 additions and 1 deletions
|
|
@ -271,7 +271,8 @@ NM_G_ERROR_MSG (GError *error)
|
|||
gsize _n = 0; \
|
||||
\
|
||||
if (_array) { \
|
||||
_nm_unused typeof (*(_array[0])) *_array_check = _array[0]; \
|
||||
_nm_unused gconstpointer _type_check_is_pointer = _array[0]; \
|
||||
\
|
||||
while (_array[_n]) \
|
||||
_n++; \
|
||||
} \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue