profile2linkerlist: fix perl warnings
authorStephen Hemminger <shemminger@vyatta.com>
Mon, 22 Feb 2010 23:17:20 +0000 (15:17 -0800)
committerMichal Marek <mmarek@suse.cz>
Sun, 7 Mar 2010 20:39:33 +0000 (21:39 +0100)
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>
scripts/profile2linkerlist.pl

index cb4260ebdb9192a91a93e2244ca45adc86efcc9b..6943fa7cc95b646d9f1a10752cf2577f4b1a2185 100644 (file)
@@ -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/);
 }