diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-10-14 11:55:49 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-12-15 12:21:01 +0100 |
commit | 5e0b7d8869a567d8f535f63510adf8f53ca438d3 (patch) | |
tree | 30ed3e68cf3bc71a09aab1a828de0353e7239ba7 /hw | |
parent | d229b985b504261369f2035936cc147c2606fa92 (diff) |
valgrind/i386: avoid false positives on KVM_SET_CLOCK ioctl
kvm_clock_data contains pad fields. Let's use a designated
initializer to avoid false positives from valgrind/memcheck.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/i386/kvm/clock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 58be2bda27..efdf165848 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -88,7 +88,7 @@ static void kvmclock_vm_state_change(void *opaque, int running, int ret; if (running) { - struct kvm_clock_data data; + struct kvm_clock_data data = {}; uint64_t time_at_migration = kvmclock_current_nsec(s); s->clock_valid = false; @@ -99,7 +99,6 @@ static void kvmclock_vm_state_change(void *opaque, int running, } data.clock = s->clock; - data.flags = 0; ret = kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data); if (ret < 0) { fprintf(stderr, "KVM_SET_CLOCK failed: %s\n", strerror(ret)); |