From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53887 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PR4is-0003H9-AR for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:17:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PR4io-00081y-P3 for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:17:26 -0500 Received: from mail.codesourcery.com ([38.113.113.100]:54700) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PR4io-00081f-4M for qemu-devel@nongnu.org; Fri, 10 Dec 2010 10:17:22 -0500 From: Paul Brook Date: Fri, 10 Dec 2010 15:17:18 +0000 References: <201012101402.37690.paul@codesourcery.com> <20101210145957.GD15015@amit-x200.redhat.com> In-Reply-To: <20101210145957.GD15015@amit-x200.redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201012101517.18342.paul@codesourcery.com> Subject: [Qemu-devel] Re: [PATCH 4/5] virtio-serial: Don't copy over guest buffer to host List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu list > 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