]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - scripts/recordmcount.pl
tracing: Move conditional into update_funcs() in recordmcount.pl
[mv-sheeva.git] / scripts / recordmcount.pl
index 7265a7dcac4b33d0f92e45aec5fbd3e79be1cbdc..884776a6e01a2004d0ec972b62081bda7db2e693 100755 (executable)
@@ -348,9 +348,7 @@ my $offset = 0;             # offset of ref_func to section beginning
 #
 sub update_funcs
 {
-    return if ($#offsets < 0);
-
-    defined($ref_func) || die "No function to reference";
+    return unless ($ref_func and @offsets);
 
     # A section only had a weak function, to represent it.
     # Unfortunately, a weak function may be overwritten by another
@@ -425,7 +423,7 @@ while (<IN>) {
            $read_function = 0;
        }
        # print out any recorded offsets
-       update_funcs() if (defined($ref_func));
+       update_funcs();
 
        # reset all markers and arrays
        $text_found = 0;
@@ -462,7 +460,7 @@ while (<IN>) {
 }
 
 # dump out anymore offsets that may have been found
-update_funcs() if (defined($ref_func));
+update_funcs();
 
 # If we did not find any mcount callers, we are done (do nothing).
 if (!$opened) {