Przeglądaj źródła

Minor const correctness tweak in zip archiver.

Ryan C. Gordon 19 lat temu
rodzic
commit
35dcb89748
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 1 0
      CHANGELOG.txt
  2. 2 2
      archivers/zip.c

+ 1 - 0
CHANGELOG.txt

@@ -2,6 +2,7 @@
  * CHANGELOG.
  * CHANGELOG.
  */
  */
 
 
+04292007 - Minor const correctness tweak in zip archiver.
 04032007 - Added a "make dist" target for packing up source code releases.
 04032007 - Added a "make dist" target for packing up source code releases.
            Reverted Unix recursive mutex code. There were some portability
            Reverted Unix recursive mutex code. There were some portability
            issues I didn't anticipate. Upped version to 1.1.1!
            issues I didn't anticipate. Upped version to 1.1.1!

+ 2 - 2
archivers/zip.c

@@ -836,7 +836,7 @@ static int zip_version_does_symlinks(PHYSFS_uint32 version)
 } /* zip_version_does_symlinks */
 } /* zip_version_does_symlinks */
 
 
 
 
-static int zip_entry_is_symlink(ZIPentry *entry)
+static int zip_entry_is_symlink(const ZIPentry *entry)
 {
 {
     return((entry->resolved == ZIP_UNRESOLVED_SYMLINK) ||
     return((entry->resolved == ZIP_UNRESOLVED_SYMLINK) ||
            (entry->resolved == ZIP_BROKEN_SYMLINK) ||
            (entry->resolved == ZIP_BROKEN_SYMLINK) ||
@@ -1293,7 +1293,7 @@ static int ZIP_isDirectory(dvoid *opaque, const char *name, int *fileExists)
 static int ZIP_isSymLink(dvoid *opaque, const char *name, int *fileExists)
 static int ZIP_isSymLink(dvoid *opaque, const char *name, int *fileExists)
 {
 {
     int isDir;
     int isDir;
-    ZIPentry *entry = zip_find_entry((ZIPinfo *) opaque, name, &isDir);
+    const ZIPentry *entry = zip_find_entry((ZIPinfo *) opaque, name, &isDir);
     *fileExists = ((isDir) || (entry != NULL));
     *fileExists = ((isDir) || (entry != NULL));
     BAIL_IF_MACRO(entry == NULL, NULL, 0);
     BAIL_IF_MACRO(entry == NULL, NULL, 0);
     return(zip_entry_is_symlink(entry));
     return(zip_entry_is_symlink(entry));