author | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Oct 2011 23:04:35 +0000 (16:04 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Oct 2011 23:04:35 +0000 (16:04 -0700) |
* ss/inet-ntop:
inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables
inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables
compat/inet_ntop.c | patch | blob | history |
diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c
index ea249c6ac6423fd4ef865c1a9d0149ac0ba0cc46..60b5a1d0f8262baca70247923a399fdb4ee3cac1 100644 (file)
--- a/compat/inet_ntop.c
+++ b/compat/inet_ntop.c
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)