Commit 9c49fd307a6cb2d3255f9441bce5b7cb08dff79e
Committed by
Michal Marek
1 parent
86d08e569f
Exists in
master
and in
20 other branches
profile2linkerlist: fix perl warnings
Turn on strict checking. Simplify code by using "unless" statement. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: WANG Cong <amwang@redhat.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
Showing 1 changed file with 3 additions and 5 deletions Side-by-side Diff
scripts/profile2linkerlist.pl
... | ... | @@ -7,16 +7,14 @@ |
7 | 7 | # usage: |
8 | 8 | # readprofile | sort -rn | perl profile2linkerlist.pl > functionlist |
9 | 9 | # |
10 | +use strict; | |
10 | 11 | |
11 | 12 | while (<>) { |
12 | 13 | my $line = $_; |
13 | 14 | |
14 | 15 | $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/; |
15 | 16 | |
16 | - if ( ($line =~ /unknown/) || ($line =~ /total/)) { | |
17 | - | |
18 | - } else { | |
19 | - print "*(.text.$1)\n"; | |
20 | - } | |
17 | + print "*(.text.$1)\n" | |
18 | + unless ($line =~ /unknown/) || ($line =~ /total/); | |
21 | 19 | } |