mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-24 21:34:52 +02:00
8140594: Various minor code improvements (compiler)
Various minor code improvements (compiler) Reviewed-by: thartmann, kvn
This commit is contained in:
parent
96c4dc3210
commit
1e4b00b1dc
19 changed files with 77 additions and 56 deletions
|
@ -305,11 +305,9 @@ u1* ClassPathZipEntry::open_versioned_entry(const char* name, jint* filesize, TR
|
|||
}
|
||||
|
||||
if (is_multi_ver) {
|
||||
int n;
|
||||
char entry_name[JVM_MAXPATHLEN];
|
||||
if (version > 0) {
|
||||
n = jio_snprintf(entry_name, sizeof(entry_name), "META-INF/versions/%d/%s", version, name);
|
||||
entry_name[n] = '\0';
|
||||
jio_snprintf(entry_name, sizeof(entry_name), "META-INF/versions/%d/%s", version, name);
|
||||
buffer = open_entry((const char*)entry_name, filesize, false, CHECK_NULL);
|
||||
if (buffer == NULL) {
|
||||
warning("Could not find %s in %s, try to find highest version instead", entry_name, _zip_name);
|
||||
|
@ -317,8 +315,7 @@ u1* ClassPathZipEntry::open_versioned_entry(const char* name, jint* filesize, TR
|
|||
}
|
||||
if (buffer == NULL) {
|
||||
for (int i = cur_ver; i >= base_version; i--) {
|
||||
n = jio_snprintf(entry_name, sizeof(entry_name), "META-INF/versions/%d/%s", i, name);
|
||||
entry_name[n] = '\0';
|
||||
jio_snprintf(entry_name, sizeof(entry_name), "META-INF/versions/%d/%s", i, name);
|
||||
buffer = open_entry((const char*)entry_name, filesize, false, CHECK_NULL);
|
||||
if (buffer != NULL) {
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue