mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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>
This commit is contained in:
1 parent
b61ed421d2
commit
d119301b58
6 files changed
+6
-6
No files matched your search
@@ -333,7 +333,7 @@ int kdd_get_regs(kdd_guest *g, int cpuid, kdd_regs *r, int w64)
|
||||
if (!cpu)
|
||||
return -1;
|
||||
|
||||
memset(r, 0, sizeof(r));
|
||||
memset(r, 0, sizeof(*r));
|
||||
|
||||
if (w64)
|
||||
kdd_get_regs_x86_64(cpu, &r->r64);
|
||||
|
||||