From: Ian Campbell Subject: Re: [Xen-devel] [PATCH V3 08/10] Introduce Xen PCI Passthrough, PCI config space helpers (2/3) Date: Fri, 11 Nov 2011 20:37:39 +0000 Message-ID: <1321043859.16747.131.camel@dagon.hellion.org.uk> References: <1319814456-8158-1-git-send-email-anthony.perard@citrix.com> <1319814456-8158-9-git-send-email-anthony.perard@citrix.com> <20111110215353.GA23837@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Anthony PERARD Cc: Xen Devel , Stefano Stabellini , Konrad Rzeszutek Wilk , Allen Kay , QEMU-devel , Guy Zana List-Id: xen-devel@lists.xenproject.org On Fri, 2011-11-11 at 17:40 +0000, Anthony PERARD wrote: > > > if ((index < 0) && (index < PCI_ROM_SLOT)) > > > > um, which looks wrong. Should it be 'index > 0' ? > > Every other form is a bit confusing to me. I'd like to write > 0 < index < ROM_SLOT, so I know that index is between 0 and ROM_SLOT. > But, it's C and not math, so I wrote the closest way I can. "0 < index < ROM_SLOT" ==> "0 < index && index < ROM_SLOT" but you have "index < 0 && ..." which is backwards. Ian.