From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcdQp-0005TI-JZ for qemu-devel@nongnu.org; Fri, 01 Jul 2011 09:06:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcdQo-0005e7-8S for qemu-devel@nongnu.org; Fri, 01 Jul 2011 09:06:51 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:39591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcdQn-0005dw-Us for qemu-devel@nongnu.org; Fri, 01 Jul 2011 09:06:50 -0400 Received: by pzk30 with SMTP id 30so3310332pzk.4 for ; Fri, 01 Jul 2011 06:06:48 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4E0DC560.6070508@redhat.com> References: <1309496142-14228-1-git-send-email-famcool@gmail.com> <1309496142-14228-5-git-send-email-famcool@gmail.com> <4E0DC560.6070508@redhat.com> From: Fam Zheng Date: Fri, 1 Jul 2011 21:06:08 +0800 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v6 04/12] VMDK: separate vmdk_open by format version List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: stefanha@gmail.com, qemu-devel@nongnu.org, hch@lst.de > > bdrv_pread only ever returns 0 for success or -errno for errors. So you > can simplify the code like this: > > ret =3D bdrv_pread(...); > if (ret < 0) { > =C2=A0 =C2=A0goto fail_l1; > } > > You have the same pattern in other places, too. > I think bdrv_pead do return the read bytes, did you mean bdrv_read here? :) --=20 Best regards! Fam Zheng