diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-26 20:24:32 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-26 20:24:32 +0000 |
commit | b2d590d16b6e4d5a8a166c2d839c459e3990664e (patch) | |
tree | 16432dcfcb89ce1a6e2ed32b296946d22099c1f0 /libjava/prims.cc | |
parent | 4d47e8a937153616695707cb50b25c97a2d579e1 (diff) | |
download | gcc-b2d590d16b6e4d5a8a166c2d839c459e3990664e.tar.gz |
* prims.cc (process_gcj_properties): Optimization.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88147 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r-- | libjava/prims.cc | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc index 285363f2cfc..7511906b19a 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 |