eina_module - check result of module load from an array of modules
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 8 Aug 2016 09:25:32 +0000 (18:25 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 8 Aug 2016 09:38:25 +0000 (18:38 +0900)
we don't give any debug or info if a module in a list fails to load.
we should at least offer debug info. do that. this fixes coverity
issue CID 1039687

src/lib/eina/eina_module.c

index 41d1fb3..a91f61a 100644 (file)
@@ -567,7 +567,10 @@ EAPI void eina_module_list_load(Eina_Array *array)
    EINA_SAFETY_ON_NULL_RETURN(array);
    DBG("array %p, count %u", array, array->count);
    EINA_ARRAY_ITER_NEXT(array, i, m, iterator)
-     eina_module_load(m);
+     {
+        if (!eina_module_load(m))
+          DBG("Cannot load module %s", m->file);
+     }
 }
 
 EAPI void eina_module_list_unload(Eina_Array *array)