Remove unneeded code with notnull.cocci script
This continues previous commit with more complex places, where it required more than just removing some "ifs". SVN revision: 50242
This commit is contained in:
parent
2a84379ba9
commit
749cc7478c
|
@ -336,7 +336,7 @@ _ecore_config_ipc_ecore_init(const char *pipe_name, void **data)
|
|||
ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DATA,
|
||||
_ecore_config_ipc_client_sent, server);
|
||||
|
||||
if (server)
|
||||
if (*server)
|
||||
{
|
||||
INF("IPC/eCore: Server is listening on %s.", pipe_name);
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ _eina_rbtree_iterator_build(const Eina_Rbtree *root, unsigned char mask)
|
|||
}
|
||||
|
||||
it->stack = eina_array_new(8);
|
||||
if (!it->stack) goto on_error;
|
||||
if (!it->stack) goto on_error2;
|
||||
|
||||
first = _eina_rbtree_iterator_list_new(root);
|
||||
if (!first) goto on_error;
|
||||
|
@ -193,9 +193,10 @@ _eina_rbtree_iterator_build(const Eina_Rbtree *root, unsigned char mask)
|
|||
|
||||
return &it->iterator;
|
||||
|
||||
on_error:
|
||||
if (it && it->stack) eina_array_free(it->stack);
|
||||
if (it) free(it);
|
||||
on_error:
|
||||
eina_array_free(it->stack);
|
||||
on_error2:
|
||||
free(it);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue