mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 21:50:18 +01:00
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:
parent
036b793797
commit
de40eb0403
1 changed files with 7 additions and 6 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue