< prev index next >

src/java.base/share/native/libzip/zip_util.c

Print this page
rev 50999 : 8207233: Minor improvements of jdk C-coding

*** 737,753 **** ZIP_Open_Generic(const char *name, char **pmsg, int mode, jlong lastModified) { jzfile *zip = NULL; /* Clear zip error message */ ! if (pmsg != 0) { *pmsg = NULL; } zip = ZIP_Get_From_Cache(name, pmsg, lastModified); ! if (zip == NULL && *pmsg == NULL) { ZFILE zfd = ZFILE_Open(name, mode); zip = ZIP_Put_In_Cache(name, zfd, pmsg, lastModified); } return zip; } --- 737,753 ---- ZIP_Open_Generic(const char *name, char **pmsg, int mode, jlong lastModified) { jzfile *zip = NULL; /* Clear zip error message */ ! if (pmsg != NULL) { *pmsg = NULL; } zip = ZIP_Get_From_Cache(name, pmsg, lastModified); ! if (zip == NULL && pmsg != NULL && *pmsg == NULL) { ZFILE zfd = ZFILE_Open(name, mode); zip = ZIP_Put_In_Cache(name, zfd, pmsg, lastModified); } return zip; }
< prev index next >