forked from enlightenment/efl
eina_module: Drop ridiculous ERR messages from module_list_load/unload
The documentation for these functions claims that passing a NULL array results in doing nothing - that should also include logging nothing. EINA_SAFETY_ON_NULL_RETURN() logs an ERR message and should be reserved for usage when NULL is not actually a valid state. Additionally, it's entirely possible to turn off EINA_SAFETY_CHECKS, at which point these functions would stop behaving as the documentation says they do. Not great.
This commit is contained in:
parent
01aac084d7
commit
3e230693e6
|
@ -565,7 +565,7 @@ EAPI void eina_module_list_load(Eina_Array *array)
|
|||
Eina_Module *m;
|
||||
unsigned int i;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(array);
|
||||
if (!array) return;
|
||||
DBG("array %p, count %u", array, array->count);
|
||||
EINA_ARRAY_ITER_NEXT(array, i, m, iterator)
|
||||
{
|
||||
|
@ -580,7 +580,7 @@ EAPI void eina_module_list_unload(Eina_Array *array)
|
|||
Eina_Module *m;
|
||||
unsigned int i;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(array);
|
||||
if (!array) return;
|
||||
DBG("array %p, count %u", array, array->count);
|
||||
EINA_ARRAY_ITER_NEXT(array, i, m, iterator)
|
||||
eina_module_unload(m);
|
||||
|
|
Loading…
Reference in New Issue