aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstat
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/xenstat
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/xenstat')
-rw-r--r--tools/xenstat/libxenstat/src/xenstat_linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xenstat/libxenstat/src/xenstat_linux.c b/tools/xenstat/libxenstat/src/xenstat_linux.c
index 1543fb21de..931b24e154 100644
--- a/tools/xenstat/libxenstat/src/xenstat_linux.c
+++ b/tools/xenstat/libxenstat/src/xenstat_linux.c
@@ -113,7 +113,7 @@ int parseNetDevLine(char *line, char *iface, unsigned long long *rxBytes, unsign
/* Initialize all variables called has passed as non-NULL to zeros */
if (iface != NULL)
- memset(iface, 0, sizeof(iface));
+ memset(iface, 0, sizeof(*iface));
if (rxBytes != NULL)
*rxBytes = 0;
if (rxPackets != NULL)