summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/detect_devices.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index ace2d12cb..1afd3c7f9 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -350,13 +350,11 @@ sub getCPUs {
my (@cpus, $cpu);
foreach (cat_("/proc/cpuinfo")) {
if (/^processor/) {
- next unless $cpu;
- push @cpus, $cpu;
+ push @cpus, $cpu if $cpu;
$cpu = {};
- } else {
- /(\S*)\s*:\s*(\S*)/;
- $cpu->{$1} = $2 if $1;
}
+ /(\S*)\s*:\s*(\S*)/;
+ $cpu->{$1} = $2 if $1;
}
push @cpus, $cpu;
@cpus;