aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python
diff options
context:
space:
mode:
authorMichael Young <m.a.young@durham.ac.uk>2013-02-13 17:00:15 +0000
committerMichael Young <m.a.young@durham.ac.uk>2013-02-13 17:00:15 +0000
commitd119301b5816b39b5ba722a2f8b301b37e8e34bd (patch)
treeb61060cef8f2d520e2303df56cdc1f415c1ab88b /tools/python
parentb61ed421d2c85b5b106c63f2c14f8aa162b282f0 (diff)
downloadxen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.tar.gz
xen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.tar.bz2
xen-d119301b5816b39b5ba722a2f8b301b37e8e34bd.zip
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 <m.a.young@durham.ac.uk> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'tools/python')
-rw-r--r--tools/python/xen/lowlevel/netlink/libnetlink.c2
1 files changed, 1 insertions, 1 deletions
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) {