[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 01/16] Fix parameter type in vhost migration log path
From: |
Laurent Vivier |
Subject: |
[PULL v2 01/16] Fix parameter type in vhost migration log path |
Date: |
Wed, 10 Jun 2020 15:09:56 +0200 |
From: Raphael Norwitz <raphael.s.norwitz@gmail.com>
The ‘enable’ parameter to the vhost_migration_log() function is given as
an int, but "true"/"false" values are passed in wherever it is invoked.
Inside the function itself it is only ever compared with bool values.
Therefore the parameter value itself should be changed to bool.
Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <CAFubqFtqNZw=Y-ar3N=3zTQi6LkKg_G-7W7OOHHbE7Y1fV7HAQ@mail.gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
hw/virtio/vhost.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index aff98a0ede56..aa06a3691919 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -809,12 +809,12 @@ err_features:
return r;
}
-static int vhost_migration_log(MemoryListener *listener, int enable)
+static int vhost_migration_log(MemoryListener *listener, bool enable)
{
struct vhost_dev *dev = container_of(listener, struct vhost_dev,
memory_listener);
int r;
- if (!!enable == dev->log_enabled) {
+ if (enable == dev->log_enabled) {
return 0;
}
if (!dev->started) {
--
2.26.2
- [PULL v2 00/16] Trivial branch for 5.1 patches, Laurent Vivier, 2020/06/10
- [PULL v2 03/16] .mailmap: Update Fred Konrad email address, Laurent Vivier, 2020/06/10
- [PULL v2 05/16] hw/isa/apm: Convert debug printf()s to trace events, Laurent Vivier, 2020/06/10
- [PULL v2 02/16] net: Do not include a newline in the id of -nic devices, Laurent Vivier, 2020/06/10
- [PULL v2 08/16] hw/arm/aspeed: Correct DRAM container region size, Laurent Vivier, 2020/06/10
- [PULL v2 01/16] Fix parameter type in vhost migration log path,
Laurent Vivier <=
- [PULL v2 07/16] qemu-img: Fix doc typo for 'bitmap' subcommand, Laurent Vivier, 2020/06/10
- [PULL v2 06/16] hw/misc/auxbus: Use qemu_log_mask(UNIMP) instead of debug printf, Laurent Vivier, 2020/06/10
- [PULL v2 09/16] hw/hppa/dino: Use the IEC binary prefix definitions, Laurent Vivier, 2020/06/10
- [PULL v2 13/16] target/unicore32: Replace DPRINTF() by qemu_log_mask(GUEST_ERROR), Laurent Vivier, 2020/06/10
- [PULL v2 12/16] target/unicore32: Remove unused headers, Laurent Vivier, 2020/06/10
- [PULL v2 14/16] target/unicore32: Prefer qemu_semihosting_log_out() over curses, Laurent Vivier, 2020/06/10
- [PULL v2 11/16] target/i386/cpu: Use the IEC binary prefix definitions, Laurent Vivier, 2020/06/10
- [PULL v2 04/16] hw/unicore32/puv3: Use qemu_log_mask(ERROR) instead of debug printf(), Laurent Vivier, 2020/06/10
- [PULL v2 16/16] semihosting: remove the pthread include which seems unused, Laurent Vivier, 2020/06/10
- [PULL v2 15/16] hw/openrisc/openrisc_sim: Add assertion to silence GCC warning, Laurent Vivier, 2020/06/10