From: Ben Pfaff Date: Fri, 9 Dec 2011 23:54:43 +0000 (-0800) Subject: dpif-linux: Avoid valgrind warning in epoll_ctl() call. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=733c8d13d7c247245209f9fe54134f35051d3e88;p=openvswitch dpif-linux: Avoid valgrind warning in epoll_ctl() call. Valgrind points out correctly that there are uninitialized bytes in the 'event' structure. That's OK, but it doesn't hurt to suppress the warning by zeroing all of the bytes. This doesn't fix a real bug. Signed-off-by: Ben Pfaff --- diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c index 1f6c2c02..317274e3 100644 --- a/lib/dpif-linux.c +++ b/lib/dpif-linux.c @@ -1026,6 +1026,7 @@ dpif_linux_recv_set_mask(struct dpif *dpif_, int listen_mask) return error; } + memset(&event, 0, sizeof event); event.events = EPOLLIN; event.data.u32 = i; if (epoll_ctl(dpif->epoll_fd, EPOLL_CTL_ADD,