summaryrefslogtreecommitdiff
path: root/libnm-core/nm-setting-ovs-interface.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-07-28 10:43:21 +0200
committerThomas Haller <thaller@redhat.com>2018-08-10 10:38:19 +0200
commit23adc373777d923de43626c028cbb1e0d649154a (patch)
tree38f5d74e575d0108df3ec70276bf36d32b92fbed /libnm-core/nm-setting-ovs-interface.c
parent19ef103e39236c5a980955930a8e52be0ff69c95 (diff)
downloadNetworkManager-23adc373777d923de43626c028cbb1e0d649154a.tar.gz
libnm/trivial: cleanup variable names in settings' class-init functions
- Don't use @parent_class name. This local variable (and @object_class) is the class instance up-cast to the pointer types of the parents. The point here is not that it is the direct parent. The point is, that it's the NMSettingClass type. Also, it can only be used inconsistently, in face of NMSettingIP4Config, who's parent type is NMSettingIPConfig. Clearly, inside nm-setting-ip4-config.c we wouldn't want to use the "parent_class" name. Consistently rename @parent_class to @setting_class. - Also rename the pointer to the own class to @klass. "setting_class" is also the wrong name for that, because the right name would be something like "setting_6lowpan_class". However, "klass" is preferred over the latter, because we commonly create new GObject implementations by copying an existing one. Generic names like "klass" and "self" inside a type implementation make that simpler. - drop useless comments like /* virtual functions */ /* Properties */ It's better to logically and visually structure the code, and avoid trival remarks about that. They only end up being used inconsistently. If you even need a stronger visual separator, then an 80 char /****/ line should be preferred.
Diffstat (limited to 'libnm-core/nm-setting-ovs-interface.c')
-rw-r--r--libnm-core/nm-setting-ovs-interface.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libnm-core/nm-setting-ovs-interface.c b/libnm-core/nm-setting-ovs-interface.c
index f674f3655c..51e6e47bc7 100644
--- a/libnm-core/nm-setting-ovs-interface.c
+++ b/libnm-core/nm-setting-ovs-interface.c
@@ -362,15 +362,16 @@ finalize (GObject *object)
}
static void
-nm_setting_ovs_interface_class_init (NMSettingOvsInterfaceClass *setting_class)
+nm_setting_ovs_interface_class_init (NMSettingOvsInterfaceClass *klass)
{
- GObjectClass *object_class = G_OBJECT_CLASS (setting_class);
- NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ NMSettingClass *setting_class = NM_SETTING_CLASS (klass);
object_class->set_property = set_property;
object_class->get_property = get_property;
- object_class->finalize = finalize;
- parent_class->verify = verify;
+ object_class->finalize = finalize;
+
+ setting_class->verify = verify;
/**
* NMSettingOvsInterface:type: