Code

git-send-email: avoid uninitialized variable warning.
authorJunio C Hamano <junkio@cox.net>
Thu, 5 Oct 2006 23:36:15 +0000 (16:36 -0700)
committerJunio C Hamano <junkio@cox.net>
Thu, 5 Oct 2006 23:36:15 +0000 (16:36 -0700)
The code took length of $reply_to when it was not even defined,
causing -w to warn.

Signed-off-by: Junio C Hamano <junkio@cox.net>
git-send-email.perl

index 4a20310841b69280a21ac4c79d95ce9ce3ea7df4..3f50abaeb6901772b22e6ca2c1e87b4bd92f3b92 100755 (executable)
@@ -538,7 +538,7 @@ foreach my $t (@files) {
        send_message();
 
        # set up for the next message
-       if ($chain_reply_to || length($reply_to) == 0) {
+       if ($chain_reply_to || !defined $reply_to || length($reply_to) == 0) {
                $reply_to = $message_id;
                if (length $references > 0) {
                        $references .= " $message_id";