Skip to content

Commit

Permalink
profile2linkerlist: fix perl warnings
Browse files Browse the repository at this point in the history
Turn on strict checking.
Simplify code by using "unless" statement.

Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: WANG Cong <[email protected]>
Cc: Michal Marek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
Stephen Hemminger authored and michal42 committed Mar 7, 2010
1 parent 86d08e5 commit 9c49fd3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/profile2linkerlist.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
# usage:
# readprofile | sort -rn | perl profile2linkerlist.pl > functionlist
#
use strict;

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

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

if ( ($line =~ /unknown/) || ($line =~ /total/)) {

} else {
print "*(.text.$1)\n";
}
print "*(.text.$1)\n"
unless ($line =~ /unknown/) || ($line =~ /total/);
}

0 comments on commit 9c49fd3

Please sign in to comment.