mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
GCC 6: Avoid warning about logical OR of "equal" expressions.
The warning (see below) is fairly useless. This modification to the
code avoids it.
inotify.c: In function 'do_inotify_read':
inotify.c:219:32: error: logical 'or' of equal expressions [-Werror=logical-op]
if (errno == EWOULDBLOCK || errno == EAGAIN) /* End of list. */
^~
This commit is contained in:
@@ -216,7 +216,9 @@ do_inotify_read (void)
|
||||
r = read (inotify_fd, inotify_buf + inotify_posn,
|
||||
sizeof (inotify_buf) - inotify_posn);
|
||||
if (r == -1) {
|
||||
if (errno == EWOULDBLOCK || errno == EAGAIN) /* End of list. */
|
||||
/* End of list? */
|
||||
if (errno == EWOULDBLOCK ||
|
||||
(EWOULDBLOCK != EAGAIN && errno == EAGAIN))
|
||||
break;
|
||||
reply_with_perror ("read");
|
||||
goto error;
|
||||
|
||||
Reference in New Issue
Block a user