From 6b0de3de8e935098b7bd0c09efc476d63a7a236e Mon Sep 17 00:00:00 2001 From: aiju Date: Wed, 11 Jul 2018 15:12:24 +0100 Subject: pc: fix ugly and partially broken switch() statement --- sys/src/9/pc/devarch.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/src/9/pc/devarch.c b/sys/src/9/pc/devarch.c index 1808849dc..b7b0200ca 100644 --- a/sys/src/9/pc/devarch.c +++ b/sys/src/9/pc/devarch.c @@ -758,11 +758,13 @@ cpuidentify(void) m->cpuidmodel = m->cpuidax >> 4 & 0xf; m->cpuidstepping = m->cpuidax & 0xf; switch(m->cpuidfamily){ - case 6: - m->cpuidmodel += m->cpuidax >> 16 & 0xf; - /* wet floor */ case 15: m->cpuidfamily += m->cpuidax >> 20 & 0xff; + m->cpuidmodel += m->cpuidax >> 16 & 0xf; + break; + case 6: + m->cpuidmodel += m->cpuidax >> 16 & 0xf; + break; } if(strncmp(m->cpuidid, "AuthenticAMD", 12) == 0 || -- cgit v1.2.3