Re: [Qemu-devel] [PATCH 4/6] hw/block: Fix the return type

2017-08-02 Thread Mao Zhongyi
Hi On 08/01/2017 10:29 PM, Markus Armbruster wrote: Stefan Hajnoczi writes: On Wed, Jul 26, 2017 at 08:02:53PM +0800, Mao Zhongyi wrote: When the function no success value to transmit, it usually make the function return void. It has turned out not to be a success,

Re: [Qemu-devel] [PATCH 4/6] hw/block: Fix the return type

2017-08-01 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Wed, Jul 26, 2017 at 08:02:53PM +0800, Mao Zhongyi wrote: >> When the function no success value to transmit, it usually make the >> function return void. It has turned out not to be a success, because >> it means that the extra local_err variable

Re: [Qemu-devel] [PATCH 4/6] hw/block: Fix the return type

2017-08-01 Thread Stefan Hajnoczi
On Wed, Jul 26, 2017 at 08:02:53PM +0800, Mao Zhongyi wrote: > When the function no success value to transmit, it usually make the > function return void. It has turned out not to be a success, because > it means that the extra local_err variable and error_propagate() will > be needed. It leads to

[Qemu-devel] [PATCH 4/6] hw/block: Fix the return type

2017-07-26 Thread Mao Zhongyi
When the function no success value to transmit, it usually make the function return void. It has turned out not to be a success, because it means that the extra local_err variable and error_propagate() will be needed. It leads to cumbersome code, therefore, transmit success/ failure in the return