platform/os2.c
changeset 714 03c2e2ee0905
parent 691 71d9affe0d8a
child 717 ae8bc9888553
--- a/platform/os2.c	Wed Jul 13 15:21:21 2005 +0000
+++ b/platform/os2.c	Thu Jul 21 18:10:17 2005 +0000
@@ -260,7 +260,8 @@
     ULONG drivemap = 0;
     ULONG i, bit;
     APIRET rc = DosQueryCurrentDisk(&dummy, &drivemap);
-    BAIL_IF_MACRO(os2err(rc) != NO_ERROR, NULL, retval);
+    if (os2err(rc) != NO_ERROR)
+        return;
 
     for (i = 0, bit = 1; i < 26; i++, bit <<= 1)
     {
@@ -406,7 +407,12 @@
     ULONG count = 1;
     APIRET rc;
 
-    BAIL_IF_MACRO(strlen(dirname) > sizeof (spec) - 5, ERR_BAD_FILENAME, NULL);
+    if (strlen(dirname) > sizeof (spec) - 5)
+    {
+        __PHYSFS_setError(ERR_BAD_FILENAME);
+        return;
+    } /* if */
+
     strcpy(spec, dirname);
     strcat(spec, (spec[strlen(spec) - 1] != '\\') ? "\\*.*" : "*.*");
 
@@ -414,7 +420,10 @@
                       FILE_DIRECTORY | FILE_ARCHIVED |
                       FILE_READONLY | FILE_HIDDEN | FILE_SYSTEM,
                       &fb, sizeof (fb), &count, FIL_STANDARD);
-    BAIL_IF_MACRO(os2err(rc) != NO_ERROR, NULL, 0);
+
+    if (os2err(rc) != NO_ERROR)
+        return;
+
     while (count == 1)
     {
         if ((strcmp(fb.achName, ".") != 0) && (strcmp(fb.achName, "..") != 0))