From: Per Bothner Date: Sun, 26 Sep 2004 20:24:32 +0000 (-0700) Subject: * prims.cc (process_gcj_properties): Optimization. X-Git-Tag: releases/gcc-4.0.0~4564 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08bc8777ef870ae09a248c700b6c9a129126accc;p=thirdparty%2Fgcc.git * prims.cc (process_gcj_properties): Optimization. From-SVN: r88147 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2a68a967f577..1901c4aae029 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,7 @@ +2004-09-26 Per Bothner + + * prims.cc (process_gcj_properties): Optimization. + 2004-09-26 Per Bothner * java/util/Collections.java (sort): Copy from array in forwards diff --git a/libjava/prims.cc b/libjava/prims.cc index 285363f2cfc1..7511906b19a7 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -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