@@ -3486,15 +3486,12 @@ int unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity)
34863486 uLong pos_in_central_dirSaved;
34873487
34883488
3489- if (file==NULL )
3490- return UNZ_PARAMERROR;
3489+ if (file==NULL ) return UNZ_PARAMERROR;
34913490
3492- if (strlen (szFileName)>=UNZ_MAXFILENAMEINZIP)
3493- return UNZ_PARAMERROR;
3491+ if (strlen (szFileName)>=UNZ_MAXFILENAMEINZIP) return UNZ_PARAMERROR;
34943492
34953493 s=(unz_s*)file;
3496- if (!s->current_file_ok )
3497- return UNZ_END_OF_LIST_OF_FILE;
3494+ if (!s->current_file_ok ) return UNZ_END_OF_LIST_OF_FILE;
34983495
34993496 num_fileSaved = s->num_file ;
35003497 pos_in_central_dirSaved = s->pos_in_central_dir ;
@@ -3540,12 +3537,12 @@ int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s,uInt *piSizeVar,
35403537
35413538
35423539 if (err==UNZ_OK)
3543- {
3540+ {
35443541 if (unzlocal_getLong (s->file ,&uMagic) != UNZ_OK)
35453542 err=UNZ_ERRNO;
35463543 else if (uMagic!=0x04034b50 )
35473544 err=UNZ_BADZIPFILE;
3548- }
3545+ }
35493546
35503547 if (unzlocal_getShort (s->file ,&uData) != UNZ_OK)
35513548 err=UNZ_ERRNO;
@@ -3559,17 +3556,16 @@ int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s,uInt *piSizeVar,
35593556 else if ((err==UNZ_OK) && (uData!=s->cur_file_info .compression_method ))
35603557 err=UNZ_BADZIPFILE;
35613558
3562- if ((err==UNZ_OK) && (s->cur_file_info .compression_method !=0 ) &&
3563- (s-> cur_file_info . compression_method !=Z_DEFLATED))
3564- err=UNZ_BADZIPFILE;
3559+ if ((err==UNZ_OK) && (s->cur_file_info .compression_method !=0 ) && (s-> cur_file_info . compression_method !=Z_DEFLATED)) {
3560+ err = UNZ_BADZIPFILE;
3561+ }
35653562
35663563 if (unzlocal_getLong (s->file ,&uData) != UNZ_OK) // date/time
35673564 err=UNZ_ERRNO;
35683565
35693566 if (unzlocal_getLong (s->file ,&uData) != UNZ_OK) // crc
35703567 err=UNZ_ERRNO;
3571- else if ((err==UNZ_OK) && (uData!=s->cur_file_info .crc ) &&
3572- ((uFlags & 8 )==0 ))
3568+ else if ((err==UNZ_OK) && (uData!=s->cur_file_info .crc ) && ((uFlags & 8 )==0 ))
35733569 err=UNZ_BADZIPFILE;
35743570
35753571 if (unzlocal_getLong (s->file ,&uData) != UNZ_OK) // size compr
@@ -3625,8 +3621,9 @@ int unzOpenCurrentFile (unzFile file, const char *password)
36253621 if (!s->current_file_ok )
36263622 return UNZ_PARAMERROR;
36273623
3628- if (s->pfile_in_zip_read != NULL )
3629- unzCloseCurrentFile (file);
3624+ if (s->pfile_in_zip_read != NULL ) {
3625+ unzCloseCurrentFile (file);
3626+ }
36303627
36313628 if (unzlocal_CheckCurrentFileCoherencyHeader (s,&iSizeVar,
36323629 &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
0 commit comments