__PHYSFS_platformDeinit() should return void.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 06 Aug 2017 01:30:58 -0400
changeset 1536 c791c9aaa2a2
parent 1535 9aad8ee469f5
child 1537 274c95a7cc49
__PHYSFS_platformDeinit() should return void. What are you going to do if this fails, anyhow?
src/physfs.c
src/physfs_internal.h
src/physfs_platform_haiku.cpp
src/physfs_platform_macos.c
src/physfs_platform_os2.c
src/physfs_platform_unix.c
src/physfs_platform_windows.c
--- a/src/physfs.c	Sat Aug 05 01:26:07 2017 -0400
+++ b/src/physfs.c	Sun Aug 06 01:30:58 2017 -0400
@@ -1362,8 +1362,7 @@
 
     errorLock = stateLock = NULL;
 
-    /* !!! FIXME: what on earth are you supposed to do if this fails? */
-    BAIL_IF_ERRPASS(!__PHYSFS_platformDeinit(), 0);
+    __PHYSFS_platformDeinit();
 
     return 1;
 } /* doDeinit */
--- a/src/physfs_internal.h	Sat Aug 05 01:26:07 2017 -0400
+++ b/src/physfs_internal.h	Sun Aug 06 01:30:58 2017 -0400
@@ -431,11 +431,8 @@
  * Deinitialize the platform. This is called when PHYSFS_deinit() is called
  *  from the application. You can use this to clean up anything you've
  *  allocated in your platform driver.
- *
- * Return zero if there was a catastrophic failure (which prevents you from
- *  functioning at all), and non-zero otherwise.
  */
-int __PHYSFS_platformDeinit(void);
+void __PHYSFS_platformDeinit(void);
 
 
 /*
--- a/src/physfs_platform_haiku.cpp	Sat Aug 05 01:26:07 2017 -0400
+++ b/src/physfs_platform_haiku.cpp	Sun Aug 06 01:30:58 2017 -0400
@@ -32,9 +32,9 @@
 } /* __PHYSFS_platformInit */
 
 
-int __PHYSFS_platformDeinit(void)
+void __PHYSFS_platformDeinit(void)
 {
-    return 1;  /* always succeed. */
+    /* no-op */
 } /* __PHYSFS_platformDeinit */
 
 
--- a/src/physfs_platform_macos.c	Sat Aug 05 01:26:07 2017 -0400
+++ b/src/physfs_platform_macos.c	Sun Aug 06 01:30:58 2017 -0400
@@ -27,9 +27,9 @@
 } /* __PHYSFS_platformInit */
 
 
-int __PHYSFS_platformDeinit(void)
+void __PHYSFS_platformDeinit(void)
 {
-    return 1;  /* always succeed. */
+    /* no-op */
 } /* __PHYSFS_platformDeinit */
 
 
--- a/src/physfs_platform_os2.c	Sat Aug 05 01:26:07 2017 -0400
+++ b/src/physfs_platform_os2.c	Sun Aug 06 01:30:58 2017 -0400
@@ -271,7 +271,7 @@
 } /* __PHYSFS_platformInit */
 
 
-int __PHYSFS_platformDeinit(void)
+void __PHYSFS_platformDeinit(void)
 {
     if (uconvdll)
     {
@@ -280,8 +280,6 @@
         DosFreeModule(uconvdll);
         uconvdll = 0;
     } /* if */
-
-    return 1;  /* success. */
 } /* __PHYSFS_platformDeinit */
 
 
--- a/src/physfs_platform_unix.c	Sat Aug 05 01:26:07 2017 -0400
+++ b/src/physfs_platform_unix.c	Sun Aug 06 01:30:58 2017 -0400
@@ -65,9 +65,9 @@
 } /* __PHYSFS_platformInit */
 
 
-int __PHYSFS_platformDeinit(void)
+void __PHYSFS_platformDeinit(void)
 {
-    return 1;  /* always succeed. */
+    /* no-op */
 } /* __PHYSFS_platformDeinit */
 
 
--- a/src/physfs_platform_windows.c	Sat Aug 05 01:26:07 2017 -0400
+++ b/src/physfs_platform_windows.c	Sun Aug 06 01:30:58 2017 -0400
@@ -612,10 +612,9 @@
 } /* __PHYSFS_platformInit */
 
 
-int __PHYSFS_platformDeinit(void)
+void __PHYSFS_platformDeinit(void)
 {
     deinitCDThread();
-    return 1; /* It's all good */
 } /* __PHYSFS_platformDeinit */