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/xenstat/libxenstat/src/xenstat_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/xenstat') 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) -- cgit v1.2.3