aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-01-10 13:18:48 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-01-10 13:18:48 -0800
commit3e1e94276c2917b98d62286529b605931a721dbc (patch)
treefcdc0ad9032af494c93010fbf8376ac76e1af5d5 /com32/gpllib
parentf15e98672b78b204356585ea3645bcea414c41b1 (diff)
downloadsyslinux-3e1e94276c2917b98d62286529b605931a721dbc.tar.gz
syslinux-3e1e94276c2917b98d62286529b605931a721dbc.tar.xz
syslinux-3e1e94276c2917b98d62286529b605931a721dbc.zip
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@zytor.com>
Diffstat (limited to 'com32/gpllib')
-rw-r--r--com32/gpllib/dmi/dmi_processor.c52
1 files changed, 2 insertions, 50 deletions
diff --git a/com32/gpllib/dmi/dmi_processor.c b/com32/gpllib/dmi/dmi_processor.c
index fd007da3..1cd9d1ba 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;