comparison src/share/vm/runtime/arguments.cpp @ 10240:30860066ae8f

Merge
author jwilhelm
date Mon, 06 May 2013 13:03:46 +0200
parents e01e02a9fcb6 1d0fba8a2a6d
children d17700c82d7d
comparison
equal deleted inserted replaced
10212:625ddb0052e1 10240:30860066ae8f
745 745
746 if (arg == NULL) { 746 if (arg == NULL) {
747 return; 747 return;
748 } 748 }
749 749
750 int index = *count; 750 int new_count = *count + 1;
751 751
752 // expand the array and add arg to the last element 752 // expand the array and add arg to the last element
753 (*count)++;
754 if (*bldarray == NULL) { 753 if (*bldarray == NULL) {
755 *bldarray = NEW_C_HEAP_ARRAY(char*, *count, mtInternal); 754 *bldarray = NEW_C_HEAP_ARRAY(char*, new_count, mtInternal);
756 } else { 755 } else {
757 *bldarray = REALLOC_C_HEAP_ARRAY(char*, *bldarray, *count, mtInternal); 756 *bldarray = REALLOC_C_HEAP_ARRAY(char*, *bldarray, new_count, mtInternal);
758 } 757 }
759 (*bldarray)[index] = strdup(arg); 758 (*bldarray)[*count] = strdup(arg);
759 *count = new_count;
760 } 760 }
761 761
762 void Arguments::build_jvm_args(const char* arg) { 762 void Arguments::build_jvm_args(const char* arg) {
763 add_string(&_jvm_args_array, &_num_jvm_args, arg); 763 add_string(&_jvm_args_array, &_num_jvm_args, arg);
764 } 764 }