[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH] xen: fix invalid assertion
From: |
Stefano Stabellini |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH] xen: fix invalid assertion |
Date: |
Tue, 20 Oct 2015 13:01:21 +0100 |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
On Mon, 19 Oct 2015, Paolo Bonzini wrote:
> Asserting "true" is not that useful.
>
> Reported by Coverity.
>
> Signed-off-by: Paolo Bonzini <address@hidden>
Acked-by: Stefano Stabellini <address@hidden>
> hw/xen/xen_pt_config_init.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
> index 4a5bc11..f6969ad 100644
> --- a/hw/xen/xen_pt_config_init.c
> +++ b/hw/xen/xen_pt_config_init.c
> @@ -1937,7 +1937,7 @@ static int
> xen_pt_config_reg_init(XenPCIPassthroughState *s,
> break;
> case 4: rc = xen_host_pci_get_long(&s->real_device, offset, &val);
> break;
> - default: assert(1);
> + default: abort();
> }
> if (rc) {
> /* Serious issues when we cannot read the host values! */
> @@ -1982,7 +1982,7 @@ static int
> xen_pt_config_reg_init(XenPCIPassthroughState *s,
> break;
> case 4: pci_set_long(s->dev.config + offset, val);
> break;
> - default: assert(1);
> + default: abort();
> }
> /* set register value pointer to the data. */
> reg_entry->ptr.byte = s->dev.config + offset;
> --
> 2.5.0
>
>