summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2011-02-22 17:01:42 -0500
committerDave Jones <davej@redhat.com>2011-02-22 17:01:42 -0500
commit7f9bc83b7b955370350d842195dfeb17e61e192b (patch)
tree6b53ab498773def542eecb796503b1b262c7e964
parentf072518037712e8410565227df3d52d92a6e66b8 (diff)
remove dead variable 'used_UP' and make user_is_root unsigned
-rw-r--r--cpuid.c5
-rw-r--r--lsmsr.c1
-rw-r--r--x86info.c3
-rw-r--r--x86info.h3
4 files changed, 3 insertions, 9 deletions
diff --git a/cpuid.c b/cpuid.c
index 749bd48..a5a2ad9 100644
--- a/cpuid.c
+++ b/cpuid.c
@@ -138,7 +138,6 @@ void cpuid(unsigned int CPU_number, unsigned long long idx,
perror(cpuname);
if (native_cpuid(CPU_number, idx, eax,ebx,ecx,edx))
printf("%s", NATIVE_CPUID_FAILED_MSG);
- used_UP = 1;
return;
}
@@ -202,10 +201,8 @@ void cpuid(unsigned int CPU_number, unsigned long long idx,
} else {
/* Something went wrong, just do UP and hope for the best. */
nodriver = 1;
- if (native_cpuid(CPU_number, idx, eax,ebx,ecx,edx)) {
+ if (native_cpuid(CPU_number, idx, eax,ebx,ecx,edx))
printf("%s", NATIVE_CPUID_FAILED_MSG);
- used_UP = 1;
- }
return;
}
}
diff --git a/lsmsr.c b/lsmsr.c
index 0504b3b..bbe37ea 100644
--- a/lsmsr.c
+++ b/lsmsr.c
@@ -58,7 +58,6 @@ struct {
.reg = -1,
};
-int used_UP = 0;
/* getopt_long stuff */
static struct option lopts[] = {
diff --git a/x86info.c b/x86info.c
index 6ba04a4..d310062 100644
--- a/x86info.c
+++ b/x86info.c
@@ -14,8 +14,7 @@
#include "Intel/Intel.h"
-int used_UP = 0;
-int user_is_root = 0;
+unsigned int user_is_root = 0;
unsigned int nrCPUs=1;
static unsigned int nrSMPCPUs;
diff --git a/x86info.h b/x86info.h
index 5430e57..370c1e7 100644
--- a/x86info.h
+++ b/x86info.h
@@ -179,8 +179,7 @@ extern unsigned int nrCPUs;
extern struct cpudata *firstcpu;
-extern int used_UP;
-extern int user_is_root;
+extern unsigned int user_is_root;
extern unsigned int need_root;