Skip to content

Commit 9c49fd3

Browse files
Stephen Hemmingermichal42
authored andcommitted
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>
1 parent 86d08e5 commit 9c49fd3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

‎scripts/profile2linkerlist.pl‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
# usage:
88
# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
99
#
10+
use strict;
1011

1112
while (<>) {
1213
my $line = $_;
1314

1415
$_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;
1516

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/);
2119
}

0 commit comments

Comments
 (0)