From d119301b5816b39b5ba722a2f8b301b37e8e34bd Mon Sep 17 00:00:00 2001 From: Michael Young Date: Wed, 13 Feb 2013 17:00:15 +0000 Subject: tools: Fix memset(&p,0,sizeof(p)) idiom in several places. gcc 4.8 identifies several places where code of the form memset(x, 0, sizeof(x)); is used incorrectly, meaning that less memory is set to zero than required. Signed-off-by: Michael Young Committed-by: Keir Fraser --- tools/python/xen/lowlevel/netlink/libnetlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/python') diff --git a/tools/python/xen/lowlevel/netlink/libnetlink.c b/tools/python/xen/lowlevel/netlink/libnetlink.c index 75e4a51600..c5fc0bf46b 100644 --- a/tools/python/xen/lowlevel/netlink/libnetlink.c +++ b/tools/python/xen/lowlevel/netlink/libnetlink.c @@ -37,7 +37,7 @@ int rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions, int sndbuf = 32768; int rcvbuf = 32768; - memset(rth, 0, sizeof(rth)); + memset(rth, 0, sizeof(*rth)); rth->fd = socket(AF_NETLINK, SOCK_RAW, protocol); if (rth->fd < 0) { -- cgit v1.2.3