mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
Merge branch 'ss/inet-ntop'
* ss/inet-ntop: inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables
This commit is contained in:
commit
8d3c0cb08d
|
@ -98,7 +98,9 @@ inet_ntop6(const u_char *src, char *dst, size_t size)
|
||||||
for (i = 0; i < NS_IN6ADDRSZ; i++)
|
for (i = 0; i < NS_IN6ADDRSZ; i++)
|
||||||
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
|
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
|
||||||
best.base = -1;
|
best.base = -1;
|
||||||
|
best.len = 0;
|
||||||
cur.base = -1;
|
cur.base = -1;
|
||||||
|
cur.len = 0;
|
||||||
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
|
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
|
||||||
if (words[i] == 0) {
|
if (words[i] == 0) {
|
||||||
if (cur.base == -1)
|
if (cur.base == -1)
|
||||||
|
|
Loading…
Reference in a new issue