Constify the archivers pointers. stable-2.0
authorLauri Kasanen <curaga@operamail.com>
Mon, 22 Oct 2012 23:32:05 -0400
branchstable-2.0
changeset 1304 f93e8f5d11f0
parent 1303 9d642cc86b85
child 1305 3bce0185dd28
Constify the archivers pointers. These were writable for no reason, taking up .data space.
physfs.c
--- a/physfs.c	Mon Oct 22 23:24:16 2012 -0400
+++ b/physfs.c	Mon Oct 22 23:32:05 2012 -0400
@@ -94,7 +94,7 @@
     NULL
 };
 
-static const PHYSFS_Archiver *archivers[] =
+static const PHYSFS_Archiver * const archivers[] =
 {
     &__PHYSFS_Archiver_DIR,
 #if (defined PHYSFS_SUPPORTS_ZIP)
@@ -417,7 +417,7 @@
 static DirHandle *openDirectory(const char *d, int forWriting)
 {
     DirHandle *retval = NULL;
-    const PHYSFS_Archiver **i;
+    const PHYSFS_Archiver * const *i;
     const char *ext;
 
     BAIL_IF_MACRO(!__PHYSFS_platformExists(d), ERR_NO_SUCH_FILE, NULL);