History

profile2linkerlist: fix perl warnings

Turn on strict checking. Simplify code by using "unless" statement.

Stephen Hemminger committed 16 years ago

Commit 9c49fd31 parent 86d08e51 file · +3 −5Browse files

Unified · Split

scripts/profile2linkerlist.pl+3−5
@@ -7,15 +7,13 @@ · 6 unmodified lines
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 }