[syslinux:master] dmi_processor.c: remove unreachable table values
syslinux-bot for H. Peter Anvin
hpa at zytor.com
Sun Jan 10 13:24:06 PST 2010
Commit-ID: 3e1e94276c2917b98d62286529b605931a721dbc
Gitweb: http://syslinux.zytor.com/commit/3e1e94276c2917b98d62286529b605931a721dbc
Author: H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 10 Jan 2010 13:18:48 -0800
Committer: H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 10 Jan 2010 13:18:48 -0800
dmi_processor.c: remove unreachable table values
A uint8_t can't have values all the way up to 0x12e...
Signed-off-by: H. Peter Anvin <hpa at zytor.com>
---
com32/gpllib/dmi/dmi_processor.c | 52 +------------------------------------
1 files changed, 2 insertions(+), 50 deletions(-)
diff --git a/com32/gpllib/dmi/dmi_processor.c b/com32/gpllib/dmi/dmi_processor.c
index fd007da..1cd9d1b 100644
--- a/com32/gpllib/dmi/dmi_processor.c
+++ b/com32/gpllib/dmi/dmi_processor.c
@@ -49,7 +49,7 @@ const char *dmi_processor_type(uint8_t code)
const char *dmi_processor_family(uint8_t code, char *manufacturer)
{
/* 3.3.5.2 */
- static const char *family[] = {
+ static const char *family[256] = {
NULL, /* 0x00 */
"Other",
"Unknown",
@@ -306,54 +306,6 @@ const char *dmi_processor_family(uint8_t code, char *manufacturer)
NULL,
NULL,
NULL, /* 0xFF */
- NULL,
- NULL,
- NULL,
- NULL,
- "SH-3",
- "SH-4",
- NULL, /*0x106*/
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /*0x110*/
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- "ARM",
- "StrongARM",
- NULL, /*0x19A*/
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /*0x120*/
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL, /*0x12A*/
- NULL,
- "6x86",
- "MediaGX",
- "MII" /*0x12E*/
- /* master.mif has values beyond that, but they can't be used for DMI */
};
/* Special case for ambiguous value 0xBE */
if (code == 0xBE) {
@@ -367,7 +319,7 @@ const char *dmi_processor_family(uint8_t code, char *manufacturer)
return "Core 2 or K7";
}
- if ((code<=0x12E) && (family[code] != NULL)) {
+ if (family[code] != NULL) {
return family[code];
}
return out_of_spec;
More information about the Syslinux-commits
mailing list