summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-08-22 10:20:29 -0400
committerDan Winship <danw@gnome.org>2014-09-03 11:08:14 -0400
commit1bf809a5181b41c62e2f6a73f53ba199c7d6cb3a (patch)
tree0adc917edb5480ccc574eee2752238c1d537c759
parent2b6d39e589c17afd809c3fe2ffc46e78dee02f58 (diff)
downloadNetworkManager-1bf809a5181b41c62e2f6a73f53ba199c7d6cb3a.tar.gz
libnm-core: clarify nm_setting_lookup_type*() failure
nm_setting_lookup_type() and nm_setting_lookup_type_by_quark() return G_TYPE_INVALID on failure.
-rw-r--r--libnm-core/nm-setting.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libnm-core/nm-setting.c b/libnm-core/nm-setting.c
index e8c8a1224e..748a65557e 100644
--- a/libnm-core/nm-setting.c
+++ b/libnm-core/nm-setting.c
@@ -231,14 +231,15 @@ _nm_setting_is_base_type (NMSetting *setting)
*
* Returns the #GType of the setting's class for a given setting name.
*
- * Returns: the #GType of the setting's class
+ * Returns: the #GType of the setting's class, or %G_TYPE_INVALID if
+ * @name is not recognized.
**/
GType
nm_setting_lookup_type (const char *name)
{
SettingInfo *info;
- g_return_val_if_fail (name != NULL, G_TYPE_NONE);
+ g_return_val_if_fail (name != NULL, G_TYPE_INVALID);
_ensure_registered ();
@@ -253,7 +254,8 @@ nm_setting_lookup_type (const char *name)
* Returns the #GType of the setting's class for a given setting error quark.
* Useful for figuring out which setting a returned error is for.
*
- * Returns: the #GType of the setting's class
+ * Returns: the #GType of the setting's class, or %G_TYPE_INVALID if
+ * @error_quark is not recognized
**/
GType
nm_setting_lookup_type_by_quark (GQuark error_quark)