From: Sebastian Dransfeld Date: Sat, 7 Dec 2013 12:59:16 +0000 (+0100) Subject: eina: Set it to NULL before next iteration X-Git-Tag: v1.9.0-alpha1~507 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08978ddb560ad10e4427fc7b4aaa18cf6912ba0c;p=platform%2Fupstream%2Fefl.git 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. --- diff --git a/src/lib/eina/eina_inlist.h b/src/lib/eina/eina_inlist.h index ccca63e..dd2fd73 100644 --- a/src/lib/eina/eina_inlist.h +++ b/src/lib/eina/eina_inlist.h @@ -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