Revert "poll-loop: Fix assertion in poll_create_node()."
authorGurucharan Shetty <gshetty@nicira.com>
Wed, 30 Sep 2015 15:40:30 +0000 (08:40 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 30 Sep 2015 15:47:39 +0000 (08:47 -0700)
This reverts commit ae09fae8a6b43299a628ae0989fe2fedb924d560.
Commit ae09fae8a6b432 caused segfaults while running unit tests
on Windows as pollfd.fd on Windows does not take negative values.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
AUTHORS
lib/poll-loop.c

diff --git a/AUTHORS b/AUTHORS
index cba0535..6e5bbab 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -80,7 +80,6 @@ Hao Zheng               hzheng@nicira.com
 Helmut Schaa            helmut.schaa@googlemail.com
 Huanle Han              hanxueluo@gmail.com
 Ian Campbell            Ian.Campbell@citrix.com
-Ilya Maximets           i.maximets@samsung.com
 Isaku Yamahata          yamahata@valinux.co.jp
 James P.                roampune@gmail.com
 James Page              james.page@ubuntu.com
@@ -328,7 +327,6 @@ Mikael Doverhag         mdoverhag@nicira.com
 Mrinmoy Das             mrdas@ixiacom.com
 Nagi Reddy Jonnala      njonnala@Brocade.com
 Niels van Adrichem      N.L.M.vanAdrichem@tudelft.nl
-Nikita Kalyazin         n.kalyazin@samsung.com
 Niklas Andersson        nandersson@nicira.com
 Pankaj Thakkar          thakkar@nicira.com
 Pasi Kärkkäinen         pasik@iki.fi
index 36eb5ac..3c4b55c 100644 (file)
@@ -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 == -1 || !wevent);
+    ovs_assert(!fd != !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(-1, wevent, 0, where);
+    poll_create_node(0, wevent, 0, where);
 }
 #endif /* _WIN32 */