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 <groug@kaod.org>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
Greg Kurz 2016-07-13 20:11:45 +02:00 committed by Eduardo Habkost
parent 9527e7bde5
commit 78a3930685

View File

@ -65,6 +65,9 @@ static void machine_set_kernel_irqchip(Object *obj, Visitor *v,
ms->kernel_irqchip_split = true; ms->kernel_irqchip_split = true;
break; break;
default: default:
/* The value was checked in visit_type_OnOffSplit() above. If
* we get here, then something is wrong in QEMU.
*/
abort(); abort();
} }
} }