* prims.cc (process_gcj_properties): Optimization.
authorPer Bothner <per@bothner.com>
Sun, 26 Sep 2004 20:24:32 +0000 (13:24 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Sun, 26 Sep 2004 20:24:32 +0000 (13:24 -0700)
From-SVN: r88147

libjava/ChangeLog
libjava/prims.cc

index 2a68a967f5770a7a5542005fb3a6c15a6e18d52d..1901c4aae02917fa19521bebbbd20f2886bc8370 100644 (file)
@@ -1,3 +1,7 @@
+2004-09-26  Per Bothner  <per@bothner.com>
+
+       * prims.cc (process_gcj_properties):  Optimization.
+
 2004-09-26  Per Bothner  <per@bothner.com>
 
        * java/util/Collections.java (sort):  Copy from array in forwards
index 285363f2cfc19587163602b98590bff0e01f54c5..7511906b19a7244f714911174191cd6a1515febe 100644 (file)
@@ -881,18 +881,15 @@ process_gcj_properties ()
     }
   memset ((void *) &_Jv_Environment_Properties[property_count], 
          0, sizeof (property_pair));
-  {
-    size_t i = 0;
 
-    // Null terminate the strings.
-    while (_Jv_Environment_Properties[i].key)
-      {
-        property_pair *prop = &_Jv_Environment_Properties[i];
-       prop->key[prop->key_length] = 0;
-       prop->value[prop->value_length] = 0;
-       i++;
-      }
-  }
+  // Null terminate the strings.
+  for (property_pair *prop = &_Jv_Environment_Properties[0];
+       prop->key != NULL;
+       prop++)
+    {
+      prop->key[prop->key_length] = 0;
+      prop->value[prop->value_length] = 0;
+    }
 }
 #endif // DISABLE_GETENV_PROPERTIES