[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] machine: add comment to abort path in machine_set_k
From: |
Greg Kurz |
Subject: |
[Qemu-devel] [PATCH] machine: add comment to abort path in machine_set_kernel_irqchip |
Date: |
Wed, 13 Jul 2016 20:11:45 +0200 |
User-agent: |
StGit/0.17.1-dirty |
We're not supposed to abort when the user passes a bogus value.
Since the ckecing 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 <address@hidden>
---
hw/core/machine.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 2fe6ff6f3007..e5a456f21dd9 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();
}
}
- [Qemu-devel] [PATCH] machine: add comment to abort path in machine_set_kernel_irqchip,
Greg Kurz <=