Commit 08bc8777 by Per Bothner Committed by Per Bothner

* prims.cc (process_gcj_properties): Optimization.

From-SVN: r88147
parent a22478ce
2004-09-26 Per Bothner <per@bothner.com> 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 * java/util/Collections.java (sort): Copy from array in forwards
order, rather than reverse order which may be much less efficient. order, rather than reverse order which may be much less efficient.
......
...@@ -881,17 +881,14 @@ process_gcj_properties () ...@@ -881,17 +881,14 @@ process_gcj_properties ()
} }
memset ((void *) &_Jv_Environment_Properties[property_count], memset ((void *) &_Jv_Environment_Properties[property_count],
0, sizeof (property_pair)); 0, sizeof (property_pair));
{
size_t i = 0;
// Null terminate the strings. // Null terminate the strings.
while (_Jv_Environment_Properties[i].key) for (property_pair *prop = &_Jv_Environment_Properties[0];
prop->key != NULL;
prop++)
{ {
property_pair *prop = &_Jv_Environment_Properties[i];
prop->key[prop->key_length] = 0; prop->key[prop->key_length] = 0;
prop->value[prop->value_length] = 0; prop->value[prop->value_length] = 0;
i++;
}
} }
} }
#endif // DISABLE_GETENV_PROPERTIES #endif // DISABLE_GETENV_PROPERTIES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment