[ovs-dev] [valgrind 5/5] poll-loop: Ignore 'wevent' in poll_fd_wait_at() on non-Windows.

Gurucharan Shetty shettyg at nicira.com
Thu Jun 5 14:35:43 UTC 2014


On Wed, Jun 4, 2014 at 5:07 PM, Ben Pfaff <blp at nicira.com> wrote:
> 'wevent' isn't actually used on non-Windows systems, but poll_fd_wait_at()
> and find_poll_node() treat events with different 'wevent' as different, so
> it seems better to make sure that 'wevent' doesn't matter.
>
> Alternatively, one could ovs_assert(!wevent).  I guess that would catch
> a caller accidentally swapping the 'fd' and 'wevent' arguments.
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Gurucharan Shetty <gshetty at nicira.com>
> ---
>  lib/poll-loop.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/poll-loop.c b/lib/poll-loop.c
> index 510903e..788fd16 100644
> --- a/lib/poll-loop.c
> +++ b/lib/poll-loop.c
> @@ -106,6 +106,8 @@ poll_fd_wait_at(int fd, HANDLE wevent, short int events, const char *where)
>          VLOG_ERR("No event to wait fd %d", fd);
>          return;
>      }
> +#else
> +    wevent = 0;
>  #endif
>
>      /* Check for duplicate.  If found, "or" the event. */
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list