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

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/profile2linkerlist.pl+3−5
@@ -7,15 +7,13 @@ · 6 unmodified lines
7# usage:7# usage:
8# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist8# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
9#9#
10use strict;
10 11
11while (<>) {12while (<>) {
12 my $line = $_;13 my $line = $_;
13 14
14 $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;15 $_ =~ /\W*[0-9]+\W*([a-zA-Z\_0-9]+)\W*[0-9]+/;
15 16
16 if ( ($line =~ /unknown/) || ($line =~ /total/)) {17 print "*(.text.$1)\n"
17 18 unless ($line =~ /unknown/) || ($line =~ /total/);
18 } else {
19 print "*(.text.$1)\n";
20 }
21}19}