[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v8 1/4] block: add the block queue support
From: |
Zhi Yong Wu |
Subject: |
Re: [Qemu-devel] [PATCH v8 1/4] block: add the block queue support |
Date: |
Tue, 18 Oct 2011 15:00:50 +0800 |
On Mon, Oct 17, 2011 at 6:17 PM, Paolo Bonzini <address@hidden> wrote:
> On 10/17/2011 12:17 PM, Kevin Wolf wrote:
>>
>> > > > +
>> > > > +static int qemu_block_queue_handler(BlockQueueAIOCB *request)
>> > > > +{
>> > > > + int ret;
>> > > > + BlockDriverAIOCB *res;
>> > > > +
>> > > > + res = request->handler(request->common.bs,
>> > > > request->sector_num,
>> > > > + request->qiov, request->nb_sectors,
>> > > > + qemu_block_queue_callback, request);
>> > > > + if (res) {
>> > > > + request->real_acb = res;
>> > > > + }
>> > > > +
>> > > > + ret = (res == NULL) ? 0 : 1;
>> > > > +
>> > > > + return ret;
>> > >
>> > > You mean return (res != NULL); and want to have bool as the return
>> > > value
>> > > of this function.
>> >
>> > Yeah, thanks. i will modify as below:
>> > ret = (res == NULL) ? false : true;
>>
>> ret = (res != NULL) is really more readable.
>
> "return (res != NULL);" is even nicer! :)
Great, thanks
>
> Paolo
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to address@hidden
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Regards,
Zhi Yong Wu