From: Greg Kurz Date: Wed, 13 Jul 2016 18:11:45 +0000 (+0200) Subject: machine: Add comment to abort path in machine_set_kernel_irqchip X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=78a3930685c3159c4b8f953bd9f9e7a28655d823;p=qemu.git machine: Add comment to abort path in machine_set_kernel_irqchip We're not supposed to abort when the user passes a bogus value. Since the checking is done in visit_type_OnOffSplit(), the call to abort() is legitimate. Let's add a comment to make it explicit. Signed-off-by: Greg Kurz Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- diff --git a/hw/core/machine.c b/hw/core/machine.c index 2fe6ff6f30..e5a456f21d 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -65,6 +65,9 @@ static void machine_set_kernel_irqchip(Object *obj, Visitor *v, ms->kernel_irqchip_split = true; break; default: + /* The value was checked in visit_type_OnOffSplit() above. If + * we get here, then something is wrong in QEMU. + */ abort(); } }