From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXyts-0007fX-6I for qemu-devel@nongnu.org; Sat, 18 Jun 2011 13:01:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXytr-0002VI-2m for qemu-devel@nongnu.org; Sat, 18 Jun 2011 13:01:36 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:64749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXytq-0002VD-Qn for qemu-devel@nongnu.org; Sat, 18 Jun 2011 13:01:34 -0400 Received: by gyg10 with SMTP id 10so141418gyg.4 for ; Sat, 18 Jun 2011 10:01:34 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 18 Jun 2011 18:01:33 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 10/12] VMDK: change get_cluster_offset return type to success flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , qemu-devel@nongnu.org, Christoph Hellwig On Sat, Jun 4, 2011 at 1:43 AM, Fam Zheng wrote: > + =A0 =A0if (extent->flat) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (m_data) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 m_data->valid =3D 0; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } Why copy-paste this... > + =A0 =A0 =A0 =A0*cluster_offset =3D 0; > + =A0 =A0 =A0 =A0return 0; > + =A0 =A0} > =A0 =A0 if (m_data) > =A0 =A0 =A0 =A0 m_data->valid =3D 0; ...instead of moving this above the if statement? Stefan