summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2010-09-27 03:18:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-09-27 18:41:45 (GMT)
commit61ef5e9b56e1c16f6d3c142e2c63f6e2c720c64e (patch)
tree55dcab0ea94f4630e81841217814f482ef362e01 /git-send-email.perl
parentb822423ed20df158a478c9522373bffb04fa5ecc (diff)
downloadgit-61ef5e9b56e1c16f6d3c142e2c63f6e2c720c64e.zip
git-61ef5e9b56e1c16f6d3c142e2c63f6e2c720c64e.tar.gz
git-61ef5e9b56e1c16f6d3c142e2c63f6e2c720c64e.tar.bz2
git-send-email.perl: ensure $domain is defined before using it
valid_fqdn() may attempt to operate on an undefined value if Net::Domain::domainname fails to determine the domain name. This causes perl to emit unpleasant warnings. So, add a check for whether $domain has been defined before using it. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 6dab3bf..e1f29a7 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -895,7 +895,7 @@ sub sanitize_address {
sub valid_fqdn {
my $domain = shift;
- return !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
+ return defined $domain && !($^O eq 'darwin' && $domain =~ /\.local$/) && $domain =~ /\./;
}
sub maildomain_net {