Code

annotate: fix warning about uninitialized scalar
authorMatthias Kestenholz <matthias@spinlock.ch>
Fri, 28 Apr 2006 08:42:28 +0000 (10:42 +0200)
committerJunio C Hamano <junkio@cox.net>
Fri, 28 Apr 2006 21:28:28 +0000 (14:28 -0700)
Use of uninitialized value in scalar chomp at
./git-annotate.perl line 212, <$kid> chunk 4.

Signed-off-by: Matthias Kestenholz <matthias@spinlock.ch>
git-annotate.perl

index 9df72a1662c47790a7d97309e40dc1051e5f7fcc..a7aab2566d67289f4abe57b0d91b9210f4263089 100755 (executable)
@@ -208,6 +208,9 @@ sub find_parent_renames {
        while (my $change = <$patch>) {
                chomp $change;
                my $filename = <$patch>;
+               if (!defined $filename) {
+                       next;
+               }
                chomp $filename;
 
                if ($change =~ m/^[AMD]$/ ) {