From 34acbc95229f9f841bde83691a5af949c15e105b Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 15 May 2015 16:25:00 -0600 Subject: qobject: Use 'bool' inside qdict Now that qbool is fixed, let's fix getting and setting a bool value to a qdict member to also use C99 bool rather than int. I audited all callers to ensure that the changed return type will not cause any changed semantics. Signed-off-by: Eric Blake Reviewed-by: Alberto Garcia Acked-by: Luiz Capitulino Signed-off-by: Markus Armbruster --- hw/pci/pcie_aer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/pci') diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index c8dea8ed9c..f1847ac210 100644 --- a/hw/pci/pcie_aer.c +++ b/hw/pci/pcie_aer.c @@ -975,7 +975,7 @@ static int do_pcie_aer_inject_error(Monitor *mon, if (pcie_aer_parse_error_string(error_name, &error_status, &correctable)) { char *e = NULL; error_status = strtoul(error_name, &e, 0); - correctable = qdict_get_try_bool(qdict, "correctable", 0); + correctable = qdict_get_try_bool(qdict, "correctable", false); if (!e || *e != '\0') { monitor_printf(mon, "invalid error status value. \"%s\"", error_name); @@ -989,7 +989,7 @@ static int do_pcie_aer_inject_error(Monitor *mon, if (correctable) { err.flags |= PCIE_AER_ERR_IS_CORRECTABLE; } - if (qdict_get_try_bool(qdict, "advisory_non_fatal", 0)) { + if (qdict_get_try_bool(qdict, "advisory_non_fatal", false)) { err.flags |= PCIE_AER_ERR_MAYBE_ADVISORY; } if (qdict_haskey(qdict, "header0")) { -- cgit v1.2.3