summary refs log tree commit diff
path: root/src/libnm-core-impl/nm-setting-wpan.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-01-25 09:46:18 +0100
committerMichael Biebl <biebl@debian.org>2024-01-25 09:46:18 +0100
commit70e18d99b8e3e77bb37e218d7ac582130156f8ef (patch)
treed40c587e6d3f0e094ff558e415f1bb9803643214 /src/libnm-core-impl/nm-setting-wpan.c
parentd4d8b2b91f7ba000d97a8b2aab48c85000c11314 (diff)
New upstream version 1.45.90 upstream/1.45.90
Diffstat (limited to 'src/libnm-core-impl/nm-setting-wpan.c')
-rw-r--r--src/libnm-core-impl/nm-setting-wpan.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libnm-core-impl/nm-setting-wpan.c b/src/libnm-core-impl/nm-setting-wpan.c
index bc84b01e..ba947a86 100644
--- a/src/libnm-core-impl/nm-setting-wpan.c
+++ b/src/libnm-core-impl/nm-setting-wpan.c
@@ -57,7 +57,8 @@ typedef struct {
  * Since: 1.14
  */
 struct _NMSettingWpan {
-    NMSetting parent;
+    NMSetting            parent;
+    NMSettingWpanPrivate _priv;
 };
 
 struct _NMSettingWpanClass {
@@ -67,7 +68,7 @@ struct _NMSettingWpanClass {
 G_DEFINE_TYPE(NMSettingWpan, nm_setting_wpan, NM_TYPE_SETTING)
 
 #define NM_SETTING_WPAN_GET_PRIVATE(o) \
-    (G_TYPE_INSTANCE_GET_PRIVATE((o), NM_TYPE_SETTING_WPAN, NMSettingWpanPrivate))
+    _NM_GET_PRIVATE(o, NMSettingWpan, NM_IS_SETTING_WPAN, NMSetting)
 
 /*****************************************************************************/
 
@@ -228,8 +229,6 @@ nm_setting_wpan_class_init(NMSettingWpanClass *klass)
     NMSettingClass *setting_class       = NM_SETTING_CLASS(klass);
     GArray         *properties_override = _nm_sett_info_property_override_create_array();
 
-    g_type_class_add_private(setting_class, sizeof(NMSettingWpanPrivate));
-
     object_class->get_property = _nm_setting_property_get_property_direct;
     object_class->set_property = _nm_setting_property_set_property_direct;
 
@@ -256,7 +255,8 @@ nm_setting_wpan_class_init(NMSettingWpanClass *klass)
                                               NMSettingWpanPrivate,
                                               mac_address,
                                               .direct_set_string_mac_address_len =
-                                                  IEEE802154_ADDR_LEN);
+                                                  IEEE802154_ADDR_LEN,
+                                              .direct_string_allow_empty = TRUE);
 
     /**
      * NMSettingWpan:pan-id:
@@ -334,5 +334,5 @@ nm_setting_wpan_class_init(NMSettingWpanClass *klass)
                              NM_META_SETTING_TYPE_WPAN,
                              NULL,
                              properties_override,
-                             NM_SETT_INFO_PRIVATE_OFFSET_FROM_CLASS);
+                             G_STRUCT_OFFSET(NMSettingWpan, _priv));
 }