summaryrefslogtreecommitdiff
path: root/com32/gpllib
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-03-21 22:18:52 +0100
committerErwan Velu <erwanaliasr1@gmail.com>2011-03-21 22:18:52 +0100
commitffc891cd9c3eb846f4ef3ae83ad04f9ad7b976ac (patch)
tree5e6f51dc6af3f1a992c0668b0b2acdffe21be80c /com32/gpllib
parentf95843a0cab94f2ae695e8fe64a09b9dc8d3f47a (diff)
downloadsyslinux-ffc891cd9c3eb846f4ef3ae83ad04f9ad7b976ac.tar.gz
cpuid: Simplied structure init
Let's zeroify everything and then init what is different from 0;
Diffstat (limited to 'com32/gpllib')
-rw-r--r--com32/gpllib/cpuid.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/com32/gpllib/cpuid.c b/com32/gpllib/cpuid.c
index be333905..26ee14b4 100644
--- a/com32/gpllib/cpuid.c
+++ b/com32/gpllib/cpuid.c
@@ -458,17 +458,11 @@ void set_generic_info(struct cpuinfo_x86 *c, s_cpu * cpu)
void detect_cpu(s_cpu * cpu)
{
struct cpuinfo_x86 c;
+ memset(&c,0,sizeof(c));
c.x86_clflush_size = 32;
- c.x86_l1_data_cache_size = 0;
- c.x86_l1_instruction_cache_size = 0;
- c.x86_l2_cache_size = 0;
c.x86_vendor = X86_VENDOR_UNKNOWN;
c.cpuid_level = -1; /* CPUID not detected */
- c.x86_model = c.x86_mask = 0; /* So far unknown... */
c.x86_num_cores = 1;
- memset(&c.x86_capability, 0, sizeof(c.x86_capability));
- memset(&c.x86_vendor_id, 0, sizeof(c.x86_vendor_id));
- memset(&c.x86_model_id, 0, sizeof(c.x86_model_id));
memset(&cpu->flags, 0, sizeof(s_cpu_flags));
if (!have_cpuid_p())