]> git.proxmox.com Git - ovs.git/commitdiff
dpif-linux: Avoid valgrind warning in epoll_ctl() call.
authorBen Pfaff <blp@nicira.com>
Fri, 9 Dec 2011 23:54:43 +0000 (15:54 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 12 Dec 2011 22:47:10 +0000 (14:47 -0800)
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 <blp@nicira.com>
lib/dpif-linux.c

index 1f6c2c028cd641c5653cc0434c5427bcb7c2ab4d..317274e398deaaf285574cf7a2b23e1cb4e404ca 100644 (file)
@@ -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,