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! :) 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