]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
minor tweak
authorNicholas Nethercote <njn@valgrind.org>
Mon, 17 Sep 2007 22:01:14 +0000 (22:01 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Mon, 17 Sep 2007 22:01:14 +0000 (22:01 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6851

cachegrind/cg_annotate.in

index 35f26326d98f35d7b74c37ed82d13b75ce321cec..cb7e17e7a309a59284494516f19a8dcf4f405dc4 100644 (file)
@@ -747,9 +747,9 @@ sub annotate_ann_files($)
 
         my $opened_file = "";
         my $full_file_name = "";
-        # We first try it with the empty include_dir, in case the filename has
-        # the full path.
-        foreach my $include_dir ("", @include_dirs) {
+        # Nb: include_dirs already includes "", so it works in the case
+        # where the filename has the full path.
+        foreach my $include_dir (@include_dirs) {
             my $try_name = $include_dir . $src_file;
             if (open(INPUTFILE, "< $try_name")) {
                 $opened_file    = $try_name;