machine: Add comment to abort path in machine_set_kernel_irqchip
authorGreg Kurz <groug@kaod.org>
Wed, 13 Jul 2016 18:11:45 +0000 (20:11 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Wed, 27 Jul 2016 14:25:06 +0000 (11:25 -0300)
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>
hw/core/machine.c

index 2fe6ff6f3007d72c4e95569a4f855eef6c4b717e..e5a456f21dd96b09e8d9482855f95d6a94ad7d6a 100644 (file)
@@ -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();
         }
     }