Skip to content
Closed
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/hotspot/share/runtime/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,10 +1177,10 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
bool in_white_space = true;
bool in_comment = false;
bool in_quote = false;
int quote_c = 0;
char quote_c = 0;
bool result = true;

int c = getc(stream);
char c = checked_cast<char>(getc(stream));
while(c != EOF && pos < (int)(sizeof(token)-1)) {
if (in_white_space) {
if (in_comment) {
Expand All @@ -1189,7 +1189,7 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
if (c == '#') in_comment = true;
else if (!isspace(c)) {
in_white_space = false;
token[pos++] = checked_cast<char>(c);
token[pos++] = c;
}
}
} else {
Expand All @@ -1209,10 +1209,10 @@ bool Arguments::process_settings_file(const char* file_name, bool should_exist,
} else if (in_quote && (c == quote_c)) {
in_quote = false;
} else {
token[pos++] = checked_cast<char>(c);
token[pos++] = c;
}
}
c = getc(stream);
c = checked_cast<char>(getc(stream));
}
if (pos > 0) {
token[pos] = '\0';
Expand Down