mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
gnetworkmonitornm: Use g_strv_contains() rather than reinventing it
This introduces no functional changes. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=793880
This commit is contained in:
parent
35d4c7f898
commit
8266238f6d
@ -268,7 +268,6 @@ has_property (GDBusProxy *proxy,
|
||||
const char *property_name)
|
||||
{
|
||||
char **props;
|
||||
guint i;
|
||||
gboolean prop_found = FALSE;
|
||||
|
||||
props = g_dbus_proxy_get_cached_property_names (proxy);
|
||||
@ -276,15 +275,7 @@ has_property (GDBusProxy *proxy,
|
||||
if (!props)
|
||||
return FALSE;
|
||||
|
||||
for (i = 0; props[i] != NULL; i++)
|
||||
{
|
||||
if (g_str_equal (props[i], property_name))
|
||||
{
|
||||
prop_found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
prop_found = g_strv_contains ((const gchar * const *) props, property_name);
|
||||
g_strfreev (props);
|
||||
return prop_found;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user