< prev index next >

src/share/vm/classfile/classLoader.cpp

Print this page
rev 10979 : 8140594: Various minor code improvements (compiler)

@@ -305,21 +305,19 @@
 
     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);
         }
       }
       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;
           }
         }
< prev index next >