diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2014-01-04 00:09:45 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-01-22 11:30:27 -0800 |
commit | 457bc83549e58bb87de96bed02988db3275a7611 (patch) | |
tree | cb054380182663ad1037c141c72efa14ebb6416e /dix | |
parent | 044a6ef2ff5f2c83a80b11e747f62f48830b526b (diff) |
If EAGAIN == EWOULDBLOCK, only need to check errno for one of them
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 '||'.
This quiets it, and reduces the number of calls Solaris Studio cc
generates to the __errno() function to get the thread-specific errno value.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'dix')
0 files changed, 0 insertions, 0 deletions