summaryrefslogtreecommitdiff
path: root/clients/cli
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-09 09:21:13 +0200
committerThomas Haller <thaller@redhat.com>2019-08-16 08:16:02 +0200
commitde40eb04030b2a53fc0bdaa7885abc260c7fedfe (patch)
tree6adf8d3e78c48876eaeaa7788215dcb9a25966bd /clients/cli
parent036b793797edd48c51ba1e0b700157217aa051cc (diff)
downloadNetworkManager-de40eb04030b2a53fc0bdaa7885abc260c7fedfe.tar.gz
cli: reorder checks in nmc_setting_set_property() for modifier type
No notable change in behavior, but makes more sense this way.
Diffstat (limited to 'clients/cli')
-rw-r--r--clients/cli/settings.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/clients/cli/settings.c b/clients/cli/settings.c
index 2446cb0856..91aaf28e38 100644
--- a/clients/cli/settings.c
+++ b/clients/cli/settings.c
@@ -549,12 +549,6 @@ nmc_setting_set_property (NMClient *client,
if (!property_info->property_type->set_fcn)
goto out_fail_read_only;
- if ( NM_IN_SET (modifier, '+', '-')
- && !value) {
- /* nothing to do. */
- return TRUE;
- }
-
if ( modifier == '-'
&& !property_info->property_type->set_supports_remove) {
/* The property is a plain property. It does not support '-'.
@@ -578,6 +572,13 @@ nmc_setting_set_property (NMClient *client,
}
}
+ if ( NM_IN_SET (modifier, '+', '-')
+ && ( !value
+ || !value[0])) {
+ /* nothing to do. */
+ return TRUE;
+ }
+
g_object_freeze_notify (G_OBJECT (setting));
success = property_info->property_type->set_fcn (property_info,
nmc_meta_environment,