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:
Philip Withnall 2018-02-27 12:54:38 +00:00
parent 35d4c7f898
commit 8266238f6d

View File

@ -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;
}