diff options
author | Jeff King <peff@peff.net> | 2015-12-14 21:52:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-12-14 22:06:00 +0100 |
commit | 58d29ececf8fc287d9b244c617edd174ded66b01 (patch) | |
tree | 41d3891641df42119f09207480c3e277ee63b9fa /ident.c | |
parent | ident.c: add support for IPv6 (diff) | |
download | git-58d29ececf8fc287d9b244c617edd174ded66b01.tar.xz git-58d29ececf8fc287d9b244c617edd174ded66b01.zip |
ident: fix undefined variable when NO_IPV6 is set
Commit 00bce77 (ident.c: add support for IPv6, 2015-11-27)
moved the "gethostbyname" call out of "add_domainname" and
into the helper function "canonical_name". But when moving
the code, it forgot that the "buf" variable is passed as
"host" in the helper.
Reported-by: johan defries <johandefries@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ident.c')
-rw-r--r-- | ident.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -86,7 +86,7 @@ static int canonical_name(const char *host, struct strbuf *out) freeaddrinfo(ai); } #else - struct hostent *he = gethostbyname(buf); + struct hostent *he = gethostbyname(host); if (he && strchr(he->h_name, '.')) { strbuf_addstr(out, he->h_name); status = 0; |