Skip to content

Commit 8d3c0cb

Browse files
committed
Merge branch 'ss/inet-ntop'
* ss/inet-ntop: inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables
2 parents e335304 + 185528a commit 8d3c0cb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compat/inet_ntop.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ inet_ntop6(const u_char *src, char *dst, size_t size)
9898
for (i = 0; i < NS_IN6ADDRSZ; i++)
9999
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
100100
best.base = -1;
101+
best.len = 0;
101102
cur.base = -1;
103+
cur.len = 0;
102104
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
103105
if (words[i] == 0) {
104106
if (cur.base == -1)

0 commit comments

Comments
 (0)