summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2011-02-22 17:35:17 -0500
committerDave Jones <davej@redhat.com>2011-02-22 17:35:17 -0500
commitaa4db53a35f7fc23f84169e032fef5fb626f1576 (patch)
tree0967bdb8de6d1a3956d2e2f93256144810d521c4
parent37f686272a9584442b4c31e6757f46e63f61f0a8 (diff)
remove redundant variable
-rw-r--r--x86info.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/x86info.c b/x86info.c
index c69b7d1..89f6960 100644
--- a/x86info.c
+++ b/x86info.c
@@ -159,7 +159,7 @@ static void fill_in_cpu_info(struct cpudata *cpu)
int main (int argc, char **argv)
{
- struct cpudata *cpu=NULL, *newcpu=NULL, *tmp;
+ struct cpudata *cpu=NULL, *tmp;
unsigned int i;
unsigned int display_one_cpu = 1;
@@ -199,10 +199,8 @@ int main (int argc, char **argv)
/* Allocate structs for non-boot CPUs if present */
if (nrCPUs > 1) {
for (i = 1; i < nrCPUs; i++) {
- newcpu = alloc_cpu();
- cpu->next = newcpu;
-
- cpu = newcpu;
+ cpu->next = alloc_cpu();
+ cpu = cpu->next;
cpu->number = i;
fill_in_cpu_info(cpu);