* [Qemu-devel] [PATCH] xen: fix invalid assertion
@ 2015-10-19 14:08 Paolo Bonzini
2015-10-20 12:01 ` Stefano Stabellini
2015-10-29 7:50 ` Michael Tokarev
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2015-10-19 14:08 UTC (permalink / raw
To: qemu-devel; +Cc: qemu-trivial
Asserting "true" is not that useful.
Reported by Coverity.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] xen: fix invalid assertion
2015-10-19 14:08 [Qemu-devel] [PATCH] xen: fix invalid assertion Paolo Bonzini
@ 2015-10-20 12:01 ` Stefano Stabellini
2015-10-29 7:50 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2015-10-20 12:01 UTC (permalink / raw
To: Paolo Bonzini; +Cc: qemu-trivial, qemu-devel
On Mon, 19 Oct 2015, Paolo Bonzini wrote:
> Asserting "true" is not that useful.
>
> Reported by Coverity.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] xen: fix invalid assertion
2015-10-19 14:08 [Qemu-devel] [PATCH] xen: fix invalid assertion Paolo Bonzini
2015-10-20 12:01 ` Stefano Stabellini
@ 2015-10-29 7:50 ` Michael Tokarev
1 sibling, 0 replies; 3+ messages in thread
From: Michael Tokarev @ 2015-10-29 7:50 UTC (permalink / raw
To: Paolo Bonzini, qemu-devel; +Cc: qemu-trivial
19.10.2015 17:08, Paolo Bonzini wrote:
> Asserting "true" is not that useful.
> - default: assert(1);
> + default: abort();
Blah :)
Applied to -trivial, thank you!
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-29 7:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19 14:08 [Qemu-devel] [PATCH] xen: fix invalid assertion Paolo Bonzini
2015-10-20 12:01 ` Stefano Stabellini
2015-10-29 7:50 ` Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.