On 12/17/2010 03:30 PM, Fabiano FidĂȘncio wrote:
> On Fri, Dec 17, 2010 at 10:09 AM, Enlightenment SVN
> <no-re...@enlightenment.org>  wrote:
>> Log:
>> only check errno if num<  0
>>
>> Author:       englebass
>> Date:         2010-12-17 04:09:14 -0800 (Fri, 17 Dec 2010)
>> New Revision: 55611
>> Trac:         http://trac.enlightenment.org/e/changeset/55611
>>
>> Modified:
>>   trunk/ecore/src/lib/ecore_con/ecore_con.c
>>
>> Modified: trunk/ecore/src/lib/ecore_con/ecore_con.c
>> ===================================================================
>> --- trunk/ecore/src/lib/ecore_con/ecore_con.c   2010-12-17 10:52:59 UTC (rev 
>> 55610)
>> +++ trunk/ecore/src/lib/ecore_con/ecore_con.c   2010-12-17 12:09:14 UTC (rev 
>> 55611)
>> @@ -1802,7 +1802,7 @@
>>       {
>>          num = read(svr->fd, buf, sizeof(buf));
>>          /* 0 is not a valid return value for a tcp socket */
>> -        if ((num>  0) || (errno == EAGAIN))
>> +        if ((num>  0) || ((num<  0)&&  (errno == EAGAIN)))
> Why just not check if (num != 0)&&  ...?

Because the check is different. If num > 0 then we are okay. If num < 0, 
we need to check errno.

S.

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to