aboutsummaryrefslogtreecommitdiff
path: root/libjava/prims.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/prims.cc')
-rw-r--r--libjava/prims.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/libjava/prims.cc b/libjava/prims.cc
index 285363f..7511906 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