Re: [Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-22 Thread Corey Minyard
On 01/21/2016 11:18 AM, Cédric Le Goater wrote: 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 as the same Using a return statement directly has the same..

Re: [Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-21 Thread Greg Kurz
On Thu, 21 Jan 2016 18:18:47 +0100 Cédric Le Goater wrote: > 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 as the same s/as/has > effect and it remov

Re: [Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-21 Thread Marcel Apfelbaum
On 01/21/2016 07:18 PM, Cédric Le Goater wrote: 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 as the same effect and it removes the fact that 'out' needs t

[Qemu-devel] [PATCH v2 2/9] ipmi: replace goto by a return statement

2016-01-21 Thread Cédric Le Goater
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 as the same effect and it removes the fact that 'out' needs to be defined. The code exits in ipmi_sim_handle_c