mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
71 lines
2.3 KiB
Diff
71 lines
2.3 KiB
Diff
Fix:
|
|
|
|
warning: add explicit braces to avoid dangling else [-Wdangling-else]
|
|
warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
|
|
|
|
Simplification of part of
|
|
https://github.com/libkml/libkml/commit/d4adfd8a8862ce460314e514b26cffc9815f06ea
|
|
--- src/kml/base/contrib/minizip/unzip.c.orig 2015-12-21 11:23:05.000000000 -0600
|
|
+++ src/kml/base/contrib/minizip/unzip.c 2024-07-24 12:08:19.000000000 -0500
|
|
@@ -638,10 +638,12 @@
|
|
|
|
/* we check the magic */
|
|
if (err==UNZ_OK)
|
|
+ {
|
|
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
|
|
err=UNZ_ERRNO;
|
|
else if (uMagic!=0x02014b50)
|
|
err=UNZ_BADZIPFILE;
|
|
+ }
|
|
|
|
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
|
|
err=UNZ_ERRNO;
|
|
@@ -718,10 +720,12 @@
|
|
uSizeRead = extraFieldBufferSize;
|
|
|
|
if (lSeek!=0)
|
|
+ {
|
|
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
|
lSeek=0;
|
|
else
|
|
err=UNZ_ERRNO;
|
|
+ }
|
|
if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
|
|
if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
|
|
err=UNZ_ERRNO;
|
|
@@ -743,10 +747,12 @@
|
|
uSizeRead = commentBufferSize;
|
|
|
|
if (lSeek!=0)
|
|
+ {
|
|
if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
|
lSeek=0;
|
|
else
|
|
err=UNZ_ERRNO;
|
|
+ }
|
|
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
|
|
if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
|
|
err=UNZ_ERRNO;
|
|
@@ -1007,10 +1013,12 @@
|
|
|
|
|
|
if (err==UNZ_OK)
|
|
+ {
|
|
if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
|
|
err=UNZ_ERRNO;
|
|
else if (uMagic!=0x04034b50)
|
|
err=UNZ_BADZIPFILE;
|
|
+ }
|
|
|
|
if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
|
|
err=UNZ_ERRNO;
|
|
@@ -1269,7 +1277,7 @@
|
|
return UNZ_PARAMERROR;
|
|
|
|
|
|
- if ((pfile_in_zip_read_info->read_buffer == NULL))
|
|
+ if (pfile_in_zip_read_info->read_buffer == NULL)
|
|
return UNZ_END_OF_LIST_OF_FILE;
|
|
if (len==0)
|
|
return 0;
|