You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by fi...@apache.org on 2007/09/07 09:25:24 UTC

svn commit: r573491 - /apr/apr/trunk/network_io/unix/inet_ntop.c

Author: fielding
Date: Fri Sep  7 00:25:23 2007
New Revision: 573491

URL: http://svn.apache.org/viewvc?rev=573491&view=rev
Log:
Code style only.  Forward port struct initialization from rev 573481
of apr-0.9.x.  The warning was already fixed on trunk.


Modified:
    apr/apr/trunk/network_io/unix/inet_ntop.c

Modified: apr/apr/trunk/network_io/unix/inet_ntop.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/unix/inet_ntop.c?rev=573491&r1=573490&r2=573491&view=diff
==============================================================================
--- apr/apr/trunk/network_io/unix/inet_ntop.c (original)
+++ apr/apr/trunk/network_io/unix/inet_ntop.c Fri Sep  7 00:25:23 2007
@@ -147,7 +147,7 @@
      * 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 @@
     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++;