diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2013-04-02 13:12:14 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2013-04-03 08:35:47 +0200 |
commit | f17ab954f650b4fe6c825de4f6feb2e722c7131a (patch) | |
tree | ae027a97de0f9388cba68720d6b3dd48929328e0 /libnm-util/nm-setting-vpn.c | |
parent | 228f6459e156fda5d04f4c1b501decd9d3d00bfb (diff) | |
download | NetworkManager-f17ab954f650b4fe6c825de4f6feb2e722c7131a.tar.gz |
libnm-util: make nm_setting_vpn_remove_*() return gboolean instead of void
to match other property removal functions, like nm_setting_bond_remove_option()
or nm_setting_wired_remove_s390_option().
Note:
This is an API change, make sure to bump soname when releasing libnm-util.
Diffstat (limited to 'libnm-util/nm-setting-vpn.c')
-rw-r--r-- | libnm-util/nm-setting-vpn.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libnm-util/nm-setting-vpn.c b/libnm-util/nm-setting-vpn.c index 8d6031f891..b347290606 100644 --- a/libnm-util/nm-setting-vpn.c +++ b/libnm-util/nm-setting-vpn.c @@ -223,13 +223,16 @@ nm_setting_vpn_get_data_item (NMSettingVPN *setting, const char *key) * * Deletes a key/value relationship previously established by * nm_setting_vpn_add_data_item(). + * + * Returns: %TRUE if the data item was found and removed from the internal list, + * %FALSE if it was not. **/ -void +gboolean nm_setting_vpn_remove_data_item (NMSettingVPN *setting, const char *key) { - g_return_if_fail (NM_IS_SETTING_VPN (setting)); + g_return_val_if_fail (NM_IS_SETTING_VPN (setting), FALSE); - g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key); + return g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->data, key); } static void @@ -347,13 +350,16 @@ nm_setting_vpn_get_secret (NMSettingVPN *setting, const char *key) * * Deletes a key/value relationship previously established by * nm_setting_vpn_add_secret(). + * + * Returns: %TRUE if the secret was found and removed from the internal list, + * %FALSE if it was not. **/ -void +gboolean nm_setting_vpn_remove_secret (NMSettingVPN *setting, const char *key) { - g_return_if_fail (NM_IS_SETTING_VPN (setting)); + g_return_val_if_fail (NM_IS_SETTING_VPN (setting), FALSE); - g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->secrets, key); + return g_hash_table_remove (NM_SETTING_VPN_GET_PRIVATE (setting)->secrets, key); } /** |