diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/devices/arm/processor.c | 14 | ||||
-rw-r--r-- | modules/devices/x86/processor.c | 14 |
2 files changed, 2 insertions, 26 deletions
diff --git a/modules/devices/arm/processor.c b/modules/devices/arm/processor.c index 1a324dd9..c94f41e5 100644 --- a/modules/devices/arm/processor.c +++ b/modules/devices/arm/processor.c @@ -66,18 +66,6 @@ static gint get_cpu_int(const gchar* file, gint cpuid) { return ret; } -static gboolean _g_strv_contains(const gchar * const * strv, const gchar *str) { - /* g_strv_contains() requires glib>2.44 */ - //return g_strv_contains(strv, str); - gint i = 0; - while(strv[i] != NULL) { - if (g_strcmp0(strv[i], str) == 0) - return 1; - i++; - } - return 0; -} - int processor_has_flag(gchar * strflags, gchar * strflag) { gchar **flags; @@ -85,7 +73,7 @@ int processor_has_flag(gchar * strflags, gchar * strflag) if (strflags == NULL || strflag == NULL) return 0; flags = g_strsplit(strflags, " ", 0); - ret = _g_strv_contains((const gchar * const *)flags, strflag); + ret = g_strv_contains((const gchar * const *)flags, strflag); g_strfreev(flags); return ret; } diff --git a/modules/devices/x86/processor.c b/modules/devices/x86/processor.c index 445ca716..7935a83d 100644 --- a/modules/devices/x86/processor.c +++ b/modules/devices/x86/processor.c @@ -214,18 +214,6 @@ fail: g_free(endpoint); } -static gboolean _g_strv_contains(const gchar * const * strv, const gchar *str) { - /* g_strv_contains() requires glib>2.44 */ - //return g_strv_contains(strv, str); - gint i = 0; - while(strv[i] != NULL) { - if (g_strcmp0(strv[i], str) == 0) - return 1; - i++; - } - return 0; -} - int processor_has_flag(gchar * strflags, gchar * strflag) { gchar **flags; @@ -233,7 +221,7 @@ int processor_has_flag(gchar * strflags, gchar * strflag) if (strflags == NULL || strflag == NULL) return 0; flags = g_strsplit(strflags, " ", 0); - ret = _g_strv_contains((const gchar * const *)flags, strflag); + ret = g_strv_contains((const gchar * const *)flags, strflag); g_strfreev(flags); return ret; } |