cli: reorder checks in nmc_setting_set_property() for modifier type

No notable change in behavior, but makes more sense this way.
This commit is contained in:
Thomas Haller 2019-08-09 09:21:13 +02:00
parent 036b793797
commit de40eb0403

View file

@ -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,