On Thu, 14 Apr 2011, Vincent Torri wrote:
>
>
> On Thu, 14 Apr 2011, Enlightenment SVN wrote:
>
>> Log:
>> unrevert. this is not a mistake.
with your commit, the code below fails silently, without it, you have the
error:
CRI<4620>: eina_list.c:880 eina_list_move() *** Eina Magic Check Failed
!!!
Input handle pointer is NULL !
*** NAUGHTY PROGRAMMER!!!
*** SPANK SPANK SPANK!!!
*** Now go fix your code. Tut tut tut!
which is exactly what should happend.
so explain me why you still want to check *to
Vincent
#include <stdio.h>
#include <Eina.h>
int main()
{
Eina_List *l = NULL;
Eina_List *ll = NULL;
int i = 4;
Eina_Bool res;
eina_init();
l = eina_list_append(l, &i);
res = eina_list_move(&ll, &l, &i);
printf("res : %d\n", res);
eina_shutdown();
return 0;
}
>
> explain me why it can segfault, then
>
> Vincent
>
>>
>>
>> Author: discomfitor
>> Date: 2011-04-14 00:42:04 -0700 (Thu, 14 Apr 2011)
>> New Revision: 58654
>> Trac: http://trac.enlightenment.org/e/changeset/58654
>>
>> Modified:
>> trunk/eina/src/lib/eina_list.c
>>
>> Modified: trunk/eina/src/lib/eina_list.c
>> ===================================================================
>> --- trunk/eina/src/lib/eina_list.c 2011-04-14 07:40:45 UTC (rev 58653)
>> +++ trunk/eina/src/lib/eina_list.c 2011-04-14 07:42:04 UTC (rev 58654)
>> @@ -894,7 +894,7 @@
>> EINA_SAFETY_ON_NULL_RETURN_VAL(to, EINA_FALSE);
>> EINA_SAFETY_ON_NULL_RETURN_VAL(from, EINA_FALSE);
>>
>> - EINA_MAGIC_CHECK_LIST(*to, EINA_FALSE);
>> + if (*to) EINA_MAGIC_CHECK_LIST(*to, EINA_FALSE);
>> EINA_MAGIC_CHECK_LIST(*from, EINA_FALSE);
>> EINA_MAGIC_CHECK_LIST(data, EINA_FALSE);
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Benefiting from Server Virtualization: Beyond Initial Workload
>> Consolidation -- Increasing the use of server virtualization is a top
>> priority.Virtualization can reduce costs, simplify management, and improve
>> application availability and disaster protection. Learn more about boosting
>> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
>> _______________________________________________
>> enlightenment-svn mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>>
>>
>
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel