[jbossnative-commits] JBoss Native SVN: r985 - trunk/sight/native/share.

jbossnative-commits at lists.jboss.org jbossnative-commits at lists.jboss.org
Fri Sep 7 03:01:55 EDT 2007


Author: mladen.turk at jboss.com
Date: 2007-09-07 03:01:55 -0400 (Fri, 07 Sep 2007)
New Revision: 985

Modified:
   trunk/sight/native/share/jnu.c
Log:
Init struct at declaration

Modified: trunk/sight/native/share/jnu.c
===================================================================
--- trunk/sight/native/share/jnu.c	2007-09-06 18:04:47 UTC (rev 984)
+++ trunk/sight/native/share/jnu.c	2007-09-07 07:01:55 UTC (rev 985)
@@ -585,7 +585,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;
@@ -599,9 +599,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++;




More information about the jbossnative-commits mailing list