qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 4/5] virtio-serial: Don't copy over guest buffer


From: Paul Brook
Subject: [Qemu-devel] Re: [PATCH 4/5] virtio-serial: Don't copy over guest buffer to host
Date: Fri, 10 Dec 2010 15:17:18 +0000
User-agent: KMail/1.13.5 (Linux/2.6.36-trunk-amd64; KDE/4.4.5; x86_64; ; )

> On (Fri) Dec 10 2010 [14:02:37], Paul Brook wrote:
> > > -        if (!discard) {
> > > +        if (discard) {
> > > +            goto next;
> > > +        }
> > > 
> > > +    next:
> > >          virtqueue_push(vq, &elem, 0);
> > 
> > Please don't do this.
> 
> Could you elaborate?
> 
> I can move the 'discard' check into the following 'for' loop, but since
> the value of discard doesn't change, I moved it outside.

You've replaced a perfectly good if block with a goto.

Paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]