Received: from eggs.gnu.org ([2001:4830:134:3::10]:52860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSPqB-0000ng-La for qemu-devel@nongnu.org; Wed, 27 Jul 2016 10:29:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSPq9-0005Pr-I1 for qemu-devel@nongnu.org; Wed, 27 Jul 2016 10:29:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSPq9-0005Pd-CK for qemu-devel@nongnu.org; Wed, 27 Jul 2016 10:29:41 -0400 From: Eduardo Habkost Date: Wed, 27 Jul 2016 11:29:19 -0300 Message-Id: <1469629761-23274-8-git-send-email-ehabkost@redhat.com> In-Reply-To: <1469629761-23274-1-git-send-email-ehabkost@redhat.com> References: <1469629761-23274-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PULL 7/9] machine: Add comment to abort path in machine_set_kernel_irqchip List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Richard Henderson , Marcel Apfelbaum , qemu-devel@nongnu.org, Greg Kurz From: Greg Kurz 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 --- hw/core/machine.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index 2fe6ff6..e5a456f 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(); } } -- 2.5.5