@@ -215,7 +215,7 @@ exit:
static bool vhdx_log_hdr_is_valid(VHDXLogEntries *log, VHDXLogEntryHeader *hdr,
BDRVVHDXState *s)
{
- int valid = false;
+ bool valid = false;
if (hdr->signature != VHDX_LOG_SIGNATURE) {
goto exit;
@@ -97,9 +97,9 @@ void xtensa_sim_load_kernel(XtensaCPU *cpu, MachineState *machine)
{
const char *kernel_filename = machine->kernel_filename;
#if TARGET_BIG_ENDIAN
- int big_endian = true;
+ int big_endian = 1;
#else
- int big_endian = false;
+ int big_endian = 0;
#endif
if (kernel_filename) {
@@ -832,8 +832,8 @@ static int nbd_list_meta_contexts(QIOChannel *ioc,
Error **errp)
{
int ret;
- int seen_any = false;
- int seen_qemu = false;
+ bool seen_any = false;
+ bool seen_qemu = false;
if (nbd_send_meta_query(ioc, NBD_OPT_LIST_META_CONTEXT,
info->name, NULL, errp) < 0) {
@@ -863,7 +863,9 @@ static int nbd_list_meta_contexts(QIOChannel *ioc,
return ret;
}
seen_any = true;
- seen_qemu |= strstart(context, "qemu:", NULL);
+ if (strstart(context, "qemu:", NULL)) {
+ seen_qemu = true;
+ }
info->contexts = g_renew(char *, info->contexts, ++info->n_contexts);
info->contexts[info->n_contexts - 1] = context;
}
@@ -275,7 +275,8 @@ static void dump_apic_icr(APICCommonState *s, CPUX86State *env)
static void dump_apic_interrupt(const char *name, uint32_t *ireg_tab,
uint32_t *tmr_tab)
{
- int i, empty = true;
+ int i;
+ bool empty = true;
qemu_printf("%s\t ", name);
for (i = 0; i < 256; i++) {
@@ -541,14 +541,14 @@ static int interface_get_command(QXLInstance *sin, QXLCommandExt *ext)
{
SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl);
SimpleSpiceUpdate *update;
- int ret = false;
+ int ret = 0;
qemu_mutex_lock(&ssd->lock);
update = QTAILQ_FIRST(&ssd->updates);
if (update != NULL) {
QTAILQ_REMOVE(&ssd->updates, update, next);
*ext = update->ext;
- ret = true;
+ ret = 1;
}
qemu_mutex_unlock(&ssd->lock);
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- block/vhdx-log.c | 2 +- hw/xtensa/sim.c | 4 ++-- nbd/client.c | 8 +++++--- target/i386/cpu-dump.c | 3 ++- ui/spice-display.c | 4 ++-- 5 files changed, 12 insertions(+), 9 deletions(-)