RFR 8203369 : Check for both EAGAIN and EWOULDBLOCK error codes

Weijun Wang weijun.wang at oracle.com
Fri May 25 05:13:34 UTC 2018



> On May 25, 2018, at 11:58 AM, Ivan Gerasimov <ivan.gerasimov at oracle.com> wrote:
> 
>> I also wonder whether a smart compiler might not flag code where the errors do infact have the same value:
>> 
>> if (errno == 11 || errno == 11) ...
>> 
> At least gcc -O completely removes the second redundant test, so no observable changes is expected on supported platforms.

And it silently compiles without showing any warning, right? Good if yes.

--Max


More information about the nio-dev mailing list