summaryrefslogtreecommitdiff
path: root/network_io
diff options
context:
space:
mode:
authorRoy T. Fielding <fielding@apache.org>2007-09-07 07:25:23 +0000
committerRoy T. Fielding <fielding@apache.org>2007-09-07 07:25:23 +0000
commite724c293c83a097e2d6c254ff995141863f388d0 (patch)
treeae00798cbd87c535b1d85ab7bd551a9ed8d474de /network_io
parent3df77b93d746eeb69d3f28523b4281235cef02c9 (diff)
downloadapr-e724c293c83a097e2d6c254ff995141863f388d0.tar.gz
Code style only. Forward port struct initialization from rev 573481
of apr-0.9.x. The warning was already fixed on trunk. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@573491 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io')
-rw-r--r--network_io/unix/inet_ntop.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/network_io/unix/inet_ntop.c b/network_io/unix/inet_ntop.c
index a96eb18f7..78dd3baae 100644
--- a/network_io/unix/inet_ntop.c
+++ b/network_io/unix/inet_ntop.c
@@ -147,7 +147,7 @@ inet_ntop6(const unsigned char *src, char *dst, apr_size_t size)
* to use pointer overlays. All the world's not a VAX.
*/
char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
- struct { int base, len; } best, cur;
+ struct { int base, len; } best = {-1, 0}, cur = {-1, 0};
unsigned int words[IN6ADDRSZ / INT16SZ];
int i;
const unsigned char *next_src, *src_end;
@@ -161,9 +161,6 @@ inet_ntop6(const unsigned char *src, char *dst, apr_size_t size)
next_src = src;
src_end = src + IN6ADDRSZ;
next_dest = words;
- best.base = -1;
- cur.base = -1;
- cur.len = best.len = 0; /* silence gcc4 warning */
i = 0;
do {
unsigned int next_word = (unsigned int)*next_src++;