On Mon, Oct 17, 2011 at 6:17 PM, Paolo Bonzini <pbonzini@xxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Regards, Zhi Yong Wu -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html