[ovs-dev] Revert "poll-loop: Fix assertion in poll_create_node()."
diff mbox

Message ID 1443628202-3286-1-git-send-email-gshetty@nicira.com
State Accepted
Headers show

Commit Message

Gurucharan Shetty Sept. 30, 2015, 3:50 p.m. UTC
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>
---
This patch has already been applied and is just a FYI.
---
 AUTHORS         |    2 --
 lib/poll-loop.c |    4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

Comments

Ben Pfaff Sept. 30, 2015, 4:05 p.m. UTC | #1
On Wed, Sep 30, 2015 at 08:50:02AM -0700, Gurucharan Shetty wrote:
> 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>
> ---
> This patch has already been applied and is just a FYI.

Thanks.

Patch
diff mbox

diff --git a/AUTHORS b/AUTHORS
index cba0535..6e5bbab 100644
--- 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
diff --git a/lib/poll-loop.c b/lib/poll-loop.c
index 36eb5ac..3c4b55c 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 == -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 */