src/archiver_wad.c
changeset 1402 c5a5dadb901d
parent 1331 eb06a37afa7e
child 1461 c271f43f3ef6
--- a/src/archiver_wad.c	Thu Jul 06 00:47:36 2017 -0400
+++ b/src/archiver_wad.c	Thu Jul 06 11:51:41 2017 -0400
@@ -53,13 +53,13 @@
     UNPKentry *entries = NULL;
     UNPKentry *entry = NULL;
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &directoryOffset, 4), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &directoryOffset, 4), 0);
     directoryOffset = PHYSFS_swapULE32(directoryOffset);
 
-    BAIL_IF_MACRO(!io->seek(io, directoryOffset), ERRPASS, 0);
+    BAIL_IF_ERRPASS(!io->seek(io, directoryOffset), 0);
 
     entries = (UNPKentry *) allocator.Malloc(sizeof (UNPKentry) * fileCount);
-    BAIL_IF_MACRO(!entries, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
+    BAIL_IF(!entries, PHYSFS_ERR_OUT_OF_MEMORY, NULL);
 
     for (entry = entries; fileCount > 0; fileCount--, entry++)
     {
@@ -88,16 +88,16 @@
 
     assert(io != NULL);  /* shouldn't ever happen. */
 
-    BAIL_IF_MACRO(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, buf, sizeof (buf)), ERRPASS, NULL);
+    BAIL_IF(forWriting, PHYSFS_ERR_READ_ONLY, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, buf, sizeof (buf)), NULL);
     if ((memcmp(buf, "IWAD", 4) != 0) && (memcmp(buf, "PWAD", 4) != 0))
-        BAIL_MACRO(PHYSFS_ERR_UNSUPPORTED, NULL);
+        BAIL(PHYSFS_ERR_UNSUPPORTED, NULL);
 
-    BAIL_IF_MACRO(!__PHYSFS_readAll(io, &count, sizeof (count)), ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!__PHYSFS_readAll(io, &count, sizeof (count)), NULL);
     count = PHYSFS_swapULE32(count);
 
     entries = wadLoadEntries(io, count);
-    BAIL_IF_MACRO(!entries, ERRPASS, NULL);
+    BAIL_IF_ERRPASS(!entries, NULL);
     return UNPK_openArchive(io, entries, count);
 } /* WAD_openArchive */