summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vaclav <jvaclav@redhat.com>2024-02-15 13:51:40 +0100
committerFernando Fernandez Mancera <ffmancera@riseup.net>2024-03-11 11:42:19 +0100
commit8f9ed29e2cf7eafc6ae4e0cd698f03ce2f635fe6 (patch)
tree5ddbb671879dc0b7a7929d1c5b4b40dd2523be44
parent1bb73bd55203748e46f049dbf7e92b9ba099986f (diff)
libnm: allow _nm_setting_property_define_direct_strv() to be used as expression
This is so that the resulting index can be used for aliasing properties.
-rw-r--r--src/libnm-core-impl/nm-setting-private.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libnm-core-impl/nm-setting-private.h b/src/libnm-core-impl/nm-setting-private.h
index 55bf9efd11..013c78ac64 100644
--- a/src/libnm-core-impl/nm-setting-private.h
+++ b/src/libnm-core-impl/nm-setting-private.h
@@ -877,8 +877,7 @@ _nm_properties_override(GArray *properties_override, const NMSettInfoProperty *p
private_struct_type, \
private_struct_field, \
... /* extra NMSettInfoProperty fields */) \
- G_STMT_START \
- { \
+ ({ \
GParamSpec *_param_spec; \
\
G_STATIC_ASSERT(!NM_FLAGS_ANY((param_flags), ~(NM_SETTING_PARAM_FUZZY_IGNORE))); \
@@ -900,8 +899,7 @@ _nm_properties_override(GArray *properties_override, const NMSettInfoProperty *p
private_struct_type, \
private_struct_field), \
__VA_ARGS__); \
- } \
- G_STMT_END
+ })
/*****************************************************************************/