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:
Lucas De Marchi 2010-07-14 02:20:30 +00:00
parent 2a84379ba9
commit 749cc7478c
2 changed files with 6 additions and 5 deletions

View File

@ -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);
}

View File

@ -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;
}