[PATCH] If EAGAIN == EWOULDBLOCK, only need to check errno for one of them

Keith Packard keithp at keithp.com
Wed Jan 22 11:31:18 PST 2014


Alan Coopersmith <alan.coopersmith at oracle.com> writes:

> Solaris <sys/errno.h> has:
>  #define EWOULDBLOCK       EAGAIN
> so checking (errno == EAGAIN || errno == EWOULDBLOCK) is overkill.
>
> This leads cppcheck 1.62 to complain:
> [xserver/os/io.c:365] -> [xserver/os/io.c:365]: (style) Same expression on both sides of '||'.
> [xserver/os/io.c:941] -> [xserver/os/io.c:941]: (style) Same
> expression on both sides of '||'.

Merged.
   044a6ef..457bc83  master -> master

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140122/0e2e4a5d/attachment.pgp>


More information about the xorg-devel mailing list