FYI: Fix prims.cc warning

Bryce McKinlay mckinlay@redhat.com
Thu Jul 22 01:32:00 GMT 2004


This cleans up some bogus code in prims.cc that was giving a warning. 
I'm checking it in.

Bryce

2004-07-19  Bryce McKinlay  <mckinlay@redhat.com>

    * prims.cc (process_gcj_properties): Don't increment i within LHS
    of assignment.

--- prims.cc    13 Jul 2004 21:03:03 -0000      1.92
+++ prims.cc    20 Jul 2004 15:34:41 -0000
@@ -922,8 +922,10 @@
     // Null terminate the strings.
     while (_Jv_Environment_Properties[i].key)
       {
-       
_Jv_Environment_Properties[i].key[_Jv_Environment_Properties[i].key_length] 
= 0;
-       
_Jv_Environment_Properties[i++].value[_Jv_Environment_Properties[i].value_length] 
= 0;
+        property_pair *prop = &_Jv_Environment_Properties[i];
+       prop->key[prop->key_length] = 0;
+       prop->value[prop->value_length] = 0;
+       i++;
       }
   }
 }



More information about the Java-patches mailing list