summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-10-21 23:04:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-10-21 23:04:35 (GMT)
commit8d3c0cb08dff78dfa36544f6bc720ac46cf743aa (patch)
tree11e4d2ea4b9b8eaeea22fd584019a55f3290502e /compat
parente3353046eeb1df8eafdb76efd62407fec070bce5 (diff)
parent185528a859170a659ae8359d13540211775e3056 (diff)
downloadgit-8d3c0cb08dff78dfa36544f6bc720ac46cf743aa.zip
git-8d3c0cb08dff78dfa36544f6bc720ac46cf743aa.tar.gz
git-8d3c0cb08dff78dfa36544f6bc720ac46cf743aa.tar.bz2
Merge branch 'ss/inet-ntop'
* ss/inet-ntop: inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables
Diffstat (limited to 'compat')
-rw-r--r--compat/inet_ntop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c
index ea249c6..60b5a1d 100644
--- a/compat/inet_ntop.c
+++ b/compat/inet_ntop.c
@@ -98,7 +98,9 @@ inet_ntop6(const u_char *src, char *dst, size_t size)
for (i = 0; i < NS_IN6ADDRSZ; i++)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
+ best.len = 0;
cur.base = -1;
+ cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)