diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/list_modules.pm | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/list_modules.pm b/kernel/list_modules.pm index 0da372abc..48929f95e 100644 --- a/kernel/list_modules.pm +++ b/kernel/list_modules.pm @@ -169,15 +169,13 @@ sub category2modules { sub module2category { my ($module) = @_; - my ($t1, $t2); - while (($t1, my $h) = each %l) { - while (($t2, my $l) = each %$h) { - $module eq $_ and goto found foreach @$l; - } + foreach my $t1 (keys %l) { + my $h = $l{$t1}; + foreach my $t2 (keys %$h) { + $module eq $_ and return "$t1/$t2" foreach @{$h->{$t2}}; + } } return; - found: - "$t1/$t2"; } sub sub_categories { |