diff options
-rw-r--r-- | src/devices/nm-device-private.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h index e87733ef3f..2e33d8a4a7 100644 --- a/src/devices/nm-device-private.h +++ b/src/devices/nm-device-private.h @@ -180,15 +180,14 @@ void nm_device_commit_mtu (NMDevice *self); ((NM_NARG (__VA_ARGS__) == 0) \ ? NULL \ : ({ \ - static const struct { \ - const NMLinkType types[NM_NARG (__VA_ARGS__)]; \ - const NMLinkType sentinel; \ - } _link_types = { \ - .types = { __VA_ARGS__ }, \ - .sentinel = NM_LINK_TYPE_NONE, \ + const NMLinkType _types[NM_NARG (__VA_ARGS__) + 1] = { \ + __VA_ARGS__ \ + _NM_MACRO_COMMA_IF_ARGS (__VA_ARGS__) \ + NM_LINK_TYPE_NONE, \ }; \ \ - _link_types.types; \ + nm_assert (_types[NM_NARG (__VA_ARGS__)] == NM_LINK_TYPE_NONE); \ + _types; \ })\ ) |