diff --git a/src/kernel/emulation/linux/misc/sysctl_machdep.c b/src/kernel/emulation/linux/misc/sysctl_machdep.c index 65043eb1f..5ab768ccf 100644 --- a/src/kernel/emulation/linux/misc/sysctl_machdep.c +++ b/src/kernel/emulation/linux/misc/sysctl_machdep.c @@ -52,10 +52,10 @@ const struct known_sysctl sysctls_machdep[] = { #ifndef setup #define setup(value)\ - unsigned int level = 0;\ - unsigned int eax = value;\ - unsigned int ebx;\ - unsigned int edx;\ + unsigned int level = 0; \ + unsigned int eax = value; \ + unsigned int ebx; \ + unsigned int edx; \ unsigned int ecx #endif @@ -98,9 +98,6 @@ sysctl_handler(handle_max_basic) __cpuid(level, eax, ebx, ecx, edx); - - - copyout_int(eax, (char*)old,oldlen); return 0; @@ -153,7 +150,7 @@ sysctl_handler(handle_brand_string) __cpuid(level,eax,ebx, ecx, edx); - if(eax < 0x80000004) // the information is not implemented + if (eax < 0x80000004) // the information is not implemented return 2; @@ -191,20 +188,19 @@ sysctl_handler(handle_features) __cpuid(0,eax,ebx,ecx,edx); - if(old != NULL) + if (old != NULL) { char *outsr = (char*)old; int current_length = 0; - int j = 0; for (int i = 0; i < 32; i++) { - if(i == 10 || i == 20) + if (i == 10 || i == 20) continue; - if(edx>>i&1 && current_length < *oldlen) + if ( (edx & (1<>i&1) + if (edx>>i&1) { if (len != 0) len++;