Date: Sun, 20 Oct 2002 12:20:29 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: dillon@apollo.backplane.com Cc: phk@FreeBSD.org, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: [src] cvs commit: src/sys/i386/pci pci_bus.c Message-ID: <20021020.122029.53328411.imp@bsdimp.com> In-Reply-To: <200210201746.g9KHk34e033350@apollo.backplane.com> References: <20021020172212.C1EE937B493@hub.freebsd.org> <200210201746.g9KHk34e033350@apollo.backplane.com>
index | next in thread | previous in thread | raw e-mail
In message: <200210201746.g9KHk34e033350@apollo.backplane.com>
Matthew Dillon <dillon@apollo.backplane.com> writes:
: Not so. The -1 is promoted to unsigned for the
: comparison. The code may be ugly and need a cast
: to br proper, but the condition can in fact return
: true here. I recommend you back this out or that
: you audit the nexus_pcib_read_config() code to ensure
: that it cannot return the equivalent of -1 unsigned.
: I suspect that it can in fact return -1.
: : id = nexus_pcib_read_config(0, bus, slot, func,
: : PCIR_DEVVENDOR, 4);
: :- if (id == -1)
: :- continue;
I susepct the right fix is:
if (id == 0xffffffff)
continue;
Warner
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021020.122029.53328411.imp>
