diff options
author | 2013-07-06 23:35:44 +0000 | |
---|---|---|
committer | 2013-07-06 23:35:44 +0000 | |
commit | b3d58ac7520a93392dcf9278e4a3a6cadb476bcd (patch) | |
tree | bf0e62601579d94247297e54369ffec8dc8b8bbe | |
parent | implement some simple check that make sure typedefs don't change in (diff) | |
download | wireguard-openbsd-b3d58ac7520a93392dcf9278e4a3a6cadb476bcd.tar.xz wireguard-openbsd-b3d58ac7520a93392dcf9278e4a3a6cadb476bcd.zip |
Remove unsigned comparison < 0.
Pointed out by LLVM.
ok kettenis@
-rw-r--r-- | sys/dev/pci/agp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c index 64b7b3dd794..884c714a56f 100644 --- a/sys/dev/pci/agp.c +++ b/sys/dev/pci/agp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp.c,v 1.36 2012/12/06 15:05:21 mpi Exp $ */ +/* $OpenBSD: agp.c,v 1.37 2013/07/06 23:35:44 brad Exp $ */ /*- * Copyright (c) 2000 Doug Rabson * All rights reserved. @@ -487,7 +487,7 @@ agp_generic_bind_memory(struct agp_softc *sc, struct agp_memory *mem, return (EINVAL); } - if (offset < 0 || (offset & (AGP_PAGE_SIZE - 1)) != 0 || + if ((offset & (AGP_PAGE_SIZE - 1)) != 0 || offset + mem->am_size > sc->sc_apsize) { printf("AGP: binding memory at bad offset %#lx\n", (unsigned long) offset); |