From 37eebb8693368d890b700cca6e39ec31c7e980e5 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Mon, 11 Jan 2016 07:32:32 -0600 Subject: ipmi_bmc_sim: Add break to correct watchdog NMI check It was falling through when it should have been a break. Found by Coverity. The logic could be simplified a bit with a fallthrough, probably the original thought, but that would be less clear, I think. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Peter Maydell Cc: Shannon Zhao Cc: Xiao Guangrong Cc: Stefan Hajnoczi Signed-off-by: Corey Minyard Message-Id: <1452519152-6500-3-git-send-email-minyard@acm.org> Signed-off-by: Paolo Bonzini --- hw/ipmi/ipmi_bmc_sim.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/ipmi/ipmi_bmc_sim.c') diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index b3796af624..f8b21761a2 100644 --- a/hw/ipmi/ipmi_bmc_sim.c +++ b/hw/ipmi/ipmi_bmc_sim.c @@ -1135,6 +1135,8 @@ static void set_watchdog_timer(IPMIBmcSim *ibs, rsp[2] = IPMI_CC_INVALID_DATA_FIELD; return; } + break; + default: /* We don't support PRE_SMI */ rsp[2] = IPMI_CC_INVALID_DATA_FIELD; -- cgit v1.2.1