[ovs-dev] [PATCH] poll-loop: fix assertion in poll_create_node
Ilya Maximets
i.maximets at samsung.com
Tue Sep 22 09:27:15 UTC 2015
Zero is a valid value for a file descriptor.
Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
Signed-off-by: Nikita Kalyazin <n.kalyazin at samsung.com>
---
lib/poll-loop.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/poll-loop.c b/lib/poll-loop.c
index 3c4b55c..36eb5ac 100644
--- a/lib/poll-loop.c
+++ b/lib/poll-loop.c
@@ -104,7 +104,7 @@ poll_create_node(int fd, HANDLE wevent, short int events, const char *where)
COVERAGE_INC(poll_create_node);
/* Both 'fd' and 'wevent' cannot be set. */
- ovs_assert(!fd != !wevent);
+ ovs_assert(fd == -1 || !wevent);
/* Check for duplicate. If found, "or" the events. */
node = find_poll_node(loop, fd, wevent);
@@ -159,7 +159,7 @@ poll_fd_wait_at(int fd, short int events, const char *where)
void
poll_wevent_wait_at(HANDLE wevent, const char *where)
{
- poll_create_node(0, wevent, 0, where);
+ poll_create_node(-1, wevent, 0, where);
}
#endif /* _WIN32 */
--
2.1.4
More information about the dev
mailing list