On Thu, 14 Apr 2011, Mike Blumenkrantz wrote:
> On Thu, 14 Apr 2011 07:31:26 +0200 (CEST) > Vincent Torri <vto...@univ-evry.fr> wrote: > >> >> >> On Thu, 14 Apr 2011, Vincent Torri wrote: >> >>> >>> >>> On Wed, 13 Apr 2011, Enlightenment SVN wrote: >>> >>>> Log: >>>> fix input check >>>> >>>> >>>> Author: discomfitor >>>> Date: 2011-04-13 18:04:54 -0700 (Wed, 13 Apr 2011) >>>> New Revision: 58647 >>>> Trac: http://trac.enlightenment.org/e/changeset/58647 >>>> >>>> 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-13 22:40:25 UTC (rev >>>> 58646) +++ trunk/eina/src/lib/eina_list.c 2011-04-14 01:04:54 UTC >>>> (rev 58647) @@ -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); >>> >>> why do you do that for 'to', and not for 'from' or 'data' ? >> >> And I think that it's useless. the test in EINA_MAGIC_CHECK_LIST is : >> >> if (!((*to) && ((*to)->__magic == (m)))) >> >> so *to is already checked it can't be an error. The check is the same than: if (!*to || !((*to)->__magic == (m))) so *to is checked first. If it's NULL, what is after || is not evaluated. So your check is useless Vincent ------------------------------------------------------------------------------ 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 enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel