format: run nm-code-format

Reformat with:

  clang-format version 19.1.0 (Fedora 19.1.0-1.fc41)

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2046
This commit is contained in:
Beniamino Galvani
2024-10-04 10:45:56 +02:00
parent 09e822edba
commit bb6881f88c
156 changed files with 721 additions and 731 deletions

View File

@@ -440,8 +440,8 @@ typedef struct {
v_obj_properties_idx, \ v_obj_properties_idx, \
.prop_struct_offset = \ .prop_struct_offset = \
NM_STRUCT_OFFSET_ENSURE_TYPE(NMLDBusPropertyO, v_container, v_field), \ NM_STRUCT_OFFSET_ENSURE_TYPE(NMLDBusPropertyO, v_container, v_field), \
.extra.property_vtable_o = \ .extra.property_vtable_o = &( \
&((const NMLDBusPropertVTableO){.get_o_type_fcn = (v_get_o_type_fcn), ##__VA_ARGS__})) (const NMLDBusPropertVTableO) {.get_o_type_fcn = (v_get_o_type_fcn), ##__VA_ARGS__}))
#define NML_DBUS_META_PROPERTY_INIT_AO_PROP(v_dbus_property_name, \ #define NML_DBUS_META_PROPERTY_INIT_AO_PROP(v_dbus_property_name, \
v_obj_properties_idx, \ v_obj_properties_idx, \

View File

@@ -867,8 +867,13 @@ test_bond_normalize(void)
((const char *[]) {"mode", "balance-tlb", "tlb_dynamic_lb", "1", NULL}), ((const char *[]) {"mode", "balance-tlb", "tlb_dynamic_lb", "1", NULL}),
((const char *[]) {"mode", "balance-tlb", "tlb_dynamic_lb", "1", NULL})); ((const char *[]) {"mode", "balance-tlb", "tlb_dynamic_lb", "1", NULL}));
test_bond_normalize_options( test_bond_normalize_options(
((const char ((const char *[]) {"mode",
*[]){"mode", "balance-rr", "ad_actor_sys_prio", "4", "packets_per_slave", "3", NULL}), "balance-rr",
"ad_actor_sys_prio",
"4",
"packets_per_slave",
"3",
NULL}),
((const char *[]) {"mode", "balance-rr", "packets_per_slave", "3", NULL})); ((const char *[]) {"mode", "balance-rr", "packets_per_slave", "3", NULL}));
} }

View File

@@ -22,10 +22,7 @@ typedef struct _NMIPAddrTyped {
gint8 addr_family; gint8 addr_family;
} NMIPAddrTyped; } NMIPAddrTyped;
#define NM_IP_ADDR_INIT \ #define NM_IP_ADDR_INIT {.addr_ptr = {0}}
{ \
.addr_ptr = { 0 } \
}
#define _NM_IN6ADDR_INIT(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af) \ #define _NM_IN6ADDR_INIT(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af) \
{ \ { \

View File

@@ -278,12 +278,7 @@ typedef struct _NMUtilsIPv6IfaceId {
}; };
} NMUtilsIPv6IfaceId; } NMUtilsIPv6IfaceId;
#define NM_UTILS_IPV6_IFACE_ID_INIT \ #define NM_UTILS_IPV6_IFACE_ID_INIT {{.id = 0}}
{ \
{ \
.id = 0 \
} \
}
/** /**
* nm_utils_ipv6_addr_set_interface_identifier: * nm_utils_ipv6_addr_set_interface_identifier:

View File

@@ -63,16 +63,8 @@ enum {
| NM_LLDP_SYSTEM_CAPABILITIES_DOCSIS | NM_LLDP_SYSTEM_CAPABILITIES_CVLAN \ | NM_LLDP_SYSTEM_CAPABILITIES_DOCSIS | NM_LLDP_SYSTEM_CAPABILITIES_CVLAN \
| NM_LLDP_SYSTEM_CAPABILITIES_SVLAN | NM_LLDP_SYSTEM_CAPABILITIES_TPMR)) | NM_LLDP_SYSTEM_CAPABILITIES_SVLAN | NM_LLDP_SYSTEM_CAPABILITIES_TPMR))
#define NM_LLDP_OUI_802_1 \ #define NM_LLDP_OUI_802_1 (const uint8_t[]){0x00, 0x80, 0xc2}
(const uint8_t[]) \ #define NM_LLDP_OUI_802_3 (const uint8_t[]){0x00, 0x12, 0x0f}
{ \
0x00, 0x80, 0xc2 \
}
#define NM_LLDP_OUI_802_3 \
(const uint8_t[]) \
{ \
0x00, 0x12, 0x0f \
}
#define _SD_LLDP_OUI_IANA 0x00, 0x00, 0x5E #define _SD_LLDP_OUI_IANA 0x00, 0x00, 0x5E
#define NM_LLDP_OUI_IANA \ #define NM_LLDP_OUI_IANA \

View File

@@ -102,7 +102,8 @@ struct nla_policy {
* must either match the expected array size or we check that * must either match the expected array size or we check that
* "policy" has typeof(NULL). This isn't a perfect compile time check, * "policy" has typeof(NULL). This isn't a perfect compile time check,
* but good enough. */ \ * but good enough. */ \
G_STATIC_ASSERT_EXPR(_Generic((policy), \ G_STATIC_ASSERT_EXPR( \
_Generic((policy), \
typeof(NULL): 1, \ typeof(NULL): 1, \
default: (sizeof(policy) == G_N_ELEMENTS(tb) * sizeof(struct nla_policy)))); \ default: (sizeof(policy) == G_N_ELEMENTS(tb) * sizeof(struct nla_policy)))); \
} \ } \