qemu/hw/ipmi
Cédric Le Goater d13ada5d8f ipmi: replace goto by a return statement
Each routine using the IPMI_ADD_RSP_DATA, IPMI_CHECK_CMD_LEN or
IPMI_CHECK_RESERVATION macros needs to define a goto label 'out' to
handle hidden errors. Using directly a return statement has the same
effect and it removes the fact that 'out' needs to be defined.

The code exits in ipmi_sim_handle_command() are a little different
from the rest and a "possible" error in the macro IPMI_ADD_RSP_DATA is
handled before making use of it. This might be a bit excessive as a
minimum response len is currently 300 bytes and the patch checks that
at least 3 are available.

Signed-off-by: Cédric Le Goater <clg@fr.ibm.com>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-02-06 20:44:08 +02:00
..
ipmi.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
ipmi_bmc_extern.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
ipmi_bmc_sim.c ipmi: replace goto by a return statement 2016-02-06 20:44:08 +02:00
isa_ipmi_bt.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
isa_ipmi_kcs.c hw: Clean up includes 2016-01-29 15:07:25 +00:00
Makefile.objs ipmi: Add a BT low-level interface 2015-12-22 18:39:19 +02:00