archivers/qpak.c
changeset 678 73a2641375a0
parent 658 1981818c6170
child 691 71d9affe0d8a
--- a/archivers/qpak.c	Sun Mar 13 03:18:18 2005 +0000
+++ b/archivers/qpak.c	Sun Mar 13 03:33:11 2005 +0000
@@ -75,7 +75,7 @@
 } QPAKfileinfo;
 
 /* Magic numbers... */
-#define QPAK_SIGNATURE 0x4b434150   /* "PACK" in ASCII. */
+#define QPAK_SIG 0x4b434150   /* "PACK" in ASCII. */
 
 
 static void QPAK_dirClose(dvoid *opaque)
@@ -175,11 +175,7 @@
         goto openQpak_failed;
 
     buf = PHYSFS_swapULE32(buf);
-    if (buf != QPAK_SIGNATURE)
-    {
-        __PHYSFS_setError(ERR_UNSUPPORTED_ARCHIVE);
-        goto openQpak_failed;
-    } /* if */
+    GOTO_IF_MACRO(buf != QPAK_SIG, ERR_UNSUPPORTED_ARCHIVE, openQpak_failed);
 
     if (__PHYSFS_platformRead(*fh, &buf, sizeof (PHYSFS_uint32), 1) != 1)
         goto openQpak_failed;
@@ -191,11 +187,8 @@
 
     *count = PHYSFS_swapULE32(*count);
 
-    if ((*count % 64) != 0)  /* corrupted archive? */
-    {
-        __PHYSFS_setError(ERR_CORRUPTED);
-        goto openQpak_failed;
-    } /* if */
+    /* corrupted archive? */
+    GOTO_IF_MACRO((*count % 64) != 0, ERR_CORRUPTED, openQpak_failed);
 
     if (!__PHYSFS_platformSeek(*fh, buf))
         goto openQpak_failed;