projects
/
libusual.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
127a12c
)
socket_ntop.c: avoid 'uninitialized' warning on older compilers
author
Marko Kreen
<markokr@gmail.com>
Wed, 18 Apr 2012 12:29:32 +0000
(15:29 +0300)
committer
Marko Kreen
<markokr@gmail.com>
Thu, 10 May 2012 20:14:44 +0000
(23:14 +0300)
usual/socket_ntop.c
patch
|
blob
|
blame
|
history
diff --git
a/usual/socket_ntop.c
b/usual/socket_ntop.c
index 6cac6d079209308b7b1a07413e5bef739841580f..038e5e32cb64ef2fcc22f13d3ed85133c5c1e25e 100644
(file)
--- a/
usual/socket_ntop.c
+++ b/
usual/socket_ntop.c
@@
-127,8
+127,8
@@
inet_ntop6(const u_char *src, char *dst, int size)
memset(words, '\0', sizeof words);
for (i = 0; i < IN6ADDRSZ; i++)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
- best.base = -1;
- cur.base = -1;
+ best.base =
best.len =
-1;
+ cur.base =
cur.len =
-1;
for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)