eina: Set it to NULL before next iteration

it might have been free'd by the user, so set it to NULL before next
iteration. This is an attempt to fix CID 1039913 and 1039914.

We don't use the pointer value, only the pointer, so the error is wrong.
Could flag the error in coverity, but if this fixes it, we wont see the
error in other situations.
This commit is contained in:
Sebastian Dransfeld 2013-12-07 13:59:16 +01:00
parent 3c58b3ebeb
commit 08978ddb56
1 changed files with 1 additions and 1 deletions

View File

@ -844,7 +844,7 @@ EAPI Eina_Inlist *eina_inlist_sort(Eina_Inlist *head, Eina_Compare_Cb func);
#define EINA_INLIST_FOREACH_SAFE(list, list2, it) \
for (it = NULL, it = (list ? _EINA_INLIST_CONTAINER(it, list) : NULL), list2 = it ? EINA_INLIST_GET(it)->next : NULL; \
it; \
it = list2 ? _EINA_INLIST_CONTAINER(it, list2) : NULL, list2 = list2 ? list2->next : NULL)
it = NULL, it = list2 ? _EINA_INLIST_CONTAINER(it, list2) : NULL, list2 = list2 ? list2->next : NULL)
/**
* @def EINA_INLIST_REVERSE_FOREACH