changeset 107:1c2ff205fa0e

Cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 03 Oct 2012 09:29:29 +0300
parents 93fbce0e6591
children 72813cece1ba
files dmres.c dmres.h
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dmres.c	Wed Oct 03 09:19:08 2012 +0300
+++ b/dmres.c	Wed Oct 03 09:29:29 2012 +0300
@@ -872,7 +872,7 @@
 
 /* Resources subsystem initialization and shutdown routines
  */
-int dmres_init(const char *filename, const char *path, int flags, int (*classifier)(DMResource *))
+int dmres_init(const char *filename, const char *path, const int flags, int (*classifier)(DMResource *))
 {
     // Check if we are already initialized
     if (dfResInitialized)
@@ -882,6 +882,7 @@
     dfResPath         = dm_strdup((path != NULL) ? path : DMRES_DATA_PATH);
     dfResourcesMutex  = dmCreateMutex();
 
+
     if (flags & DRF_USE_PACK)
     {
 #ifdef DMRES_PACKFS
@@ -938,7 +939,7 @@
         {
             int ret = classifier(node);
             if (ret != DMERR_OK)
-                return DMERR_INIT_FAIL;
+                return ret;
         }
     }
 
--- a/dmres.h	Wed Oct 03 09:19:08 2012 +0300
+++ b/dmres.h	Wed Oct 03 09:29:29 2012 +0300
@@ -108,7 +108,7 @@
 
 /* Functions
  */
-int          dmres_init(const char *filename, const char *path, int flags, int (*classifier)(DMResource *));
+int          dmres_init(const char *filename, const char *path, const int flags, int (*classifier)(DMResource *));
 void         dmres_close(void);
 
 void         dmres_prune(int agems, int flags);