[syslinux:master] cpuid: Simplied structure init
syslinux-bot for Erwan Velu
erwanaliasr1 at gmail.com
Mon Apr 25 15:28:08 PDT 2011
Commit-ID: ffc891cd9c3eb846f4ef3ae83ad04f9ad7b976ac
Gitweb: http://syslinux.zytor.com/commit/ffc891cd9c3eb846f4ef3ae83ad04f9ad7b976ac
Author: Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Mon, 21 Mar 2011 22:18:52 +0100
Committer: Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Mon, 21 Mar 2011 22:18:52 +0100
cpuid: Simplied structure init
Let's zeroify everything and then init what is different from 0;
---
com32/gpllib/cpuid.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/com32/gpllib/cpuid.c b/com32/gpllib/cpuid.c
index be33390..26ee14b 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())
More information about the Syslinux-commits
mailing list