diff options
author | Erwan Velu <erwanaliasr1@gmail.com> | 2011-03-21 22:08:54 +0100 |
---|---|---|
committer | Erwan Velu <erwanaliasr1@gmail.com> | 2011-03-21 22:08:54 +0100 |
commit | 7f6fa4671e9066369864f9ea21b5e0337410e551 (patch) | |
tree | eb07ee1f2db825ed1e3d37cf8c2b97a933fbf750 /com32/gpllib | |
parent | b8daff103969a20de3665c15a3e7ae4a29e22027 (diff) | |
download | syslinux-7f6fa4671e9066369864f9ea21b5e0337410e551.tar.gz |
cpuid: Fixing names & init.
The init code was nearly incorrect. Fixed regarding Shao's comments.
Diffstat (limited to 'com32/gpllib')
-rw-r--r-- | com32/gpllib/cpuid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/com32/gpllib/cpuid.c b/com32/gpllib/cpuid.c index 3d62541a..be333905 100644 --- a/com32/gpllib/cpuid.c +++ b/com32/gpllib/cpuid.c @@ -33,15 +33,15 @@ size_t cpu_flags_count = sizeof cpu_flags_names / sizeof *cpu_flags_names; struct cpu_dev *cpu_devs[X86_VENDOR_NUM] = { }; bool get_cpu_flag_value_from_name(s_cpu *cpu, const char * flag_name) { - size_t i;; - bool *flag=false; + size_t i; + bool cpu_flag_present=false, *flag_value = &cpu_flag_present; for (i = 0; i < cpu_flags_count; i++) { if (strcmp(cpu_flags_names[i],flag_name) == 0) { - flag = (bool *)((char *)&cpu->flags + cpu_flags_offset[i]); + flag_value = (bool *)((char *)&cpu->flags + cpu_flags_offset[i]); } } - return *flag; + return *flag_value; } |