[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/30] accel/kvm: ensure ret always set
From: |
Paolo Bonzini |
Subject: |
[PULL 30/30] accel/kvm: ensure ret always set |
Date: |
Wed, 2 Oct 2019 18:51:53 +0200 |
From: Alex Bennée <address@hidden>
Some of the cross compilers rightly complain there are cases where ret
may not be set. 0 seems to be the reasonable default unless particular
slot explicitly returns -1.
Signed-off-by: Alex Bennée <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
accel/kvm/kvm-all.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index aabe097..d2d96d7 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -712,11 +712,11 @@ static int kvm_physical_log_clear(KVMMemoryListener *kml,
KVMState *s = kvm_state;
uint64_t start, size, offset, count;
KVMSlot *mem;
- int ret, i;
+ int ret = 0, i;
if (!s->manual_dirty_log_protect) {
/* No need to do explicit clear */
- return 0;
+ return ret;
}
start = section->offset_within_address_space;
@@ -724,7 +724,7 @@ static int kvm_physical_log_clear(KVMMemoryListener *kml,
if (!size) {
/* Nothing more we can do... */
- return 0;
+ return ret;
}
kvm_slots_lock(kml);
--
1.8.3.1
- [PULL 21/30] docker: test-debug: disable LeakSanitizer, (continued)
- [PULL 21/30] docker: test-debug: disable LeakSanitizer, Paolo Bonzini, 2019/10/02
- [PULL 19/30] cris: do not leak struct cris_disasm_data, Paolo Bonzini, 2019/10/02
- [PULL 22/30] i386: Add CPUID bit for CLZERO and XSAVEERPTR, Paolo Bonzini, 2019/10/02
- [PULL 23/30] vfio: Turn the container error into an Error handle, Paolo Bonzini, 2019/10/02
- [PULL 25/30] Fix wrong behavior of cpu_memory_rw_debug() function in SMM, Paolo Bonzini, 2019/10/02
- [PULL 26/30] util: WSAEWOULDBLOCK on connect should map to EINPROGRESS, Paolo Bonzini, 2019/10/02
- [PULL 24/30] memory: allow memory_region_register_iommu_notifier() to fail, Paolo Bonzini, 2019/10/02
- [PULL 28/30] win32: work around main-loop busy loop on socket/fd event, Paolo Bonzini, 2019/10/02
- [PULL 29/30] tests/docker: only enable ubsan for test-clang, Paolo Bonzini, 2019/10/02
- [PULL 30/30] accel/kvm: ensure ret always set,
Paolo Bonzini <=
- [PULL 27/30] tests: skip serial test on windows, Paolo Bonzini, 2019/10/02
- Re: [PULL 00/30] Misc patches for 2010-10-02, no-reply, 2019/10/02
- [PULL 00/30] Misc patches for 2010-10-02, Paolo Bonzini, 2019/10/03