diff options
author | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:35 -0500 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:35 -0500 |
commit | 720f5023a8f68aaaa54cb6b7bf46efee23b5b4c3 (patch) | |
tree | 26a8d91183787418455f65c2bb44ed641800dad3 /arch/linux/x86/processor.h | |
parent | 854292407779593a401a1d5ce71add51880fa84f (diff) |
Import Upstream version 0.4.1
Diffstat (limited to 'arch/linux/x86/processor.h')
-rw-r--r-- | arch/linux/x86/processor.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/linux/x86/processor.h b/arch/linux/x86/processor.h index 571943f6..aba623bf 100644 --- a/arch/linux/x86/processor.h +++ b/arch/linux/x86/processor.h @@ -235,22 +235,22 @@ processor_get_capabilities_from_flags(gchar * strflags) /* FIXME: * Separate between processor capabilities, additional instructions and whatnot. */ gchar **flags, **old; gchar *tmp = ""; - gint i; + gint i, j = 0; flags = g_strsplit(strflags, " ", 0); old = flags; - while (*flags) { + while (flags[j]) { gchar *meaning = ""; for (i = 0; flag_meaning[i].name != NULL; i++) { - if (!strcmp(*flags, flag_meaning[i].name)) { + if (!strcmp(flags[j], flag_meaning[i].name)) { meaning = flag_meaning[i].meaning; break; } } - tmp = g_strdup_printf("%s%s=%s\n", tmp, *flags, meaning); - *flags++; + tmp = g_strdup_printf("%s%s=%s\n", tmp, flags[j], meaning); + j++; } g_strfreev(old); |