diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-03-03 21:47:40 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-03-03 21:47:40 +0000 |
commit | 37d4c2e93b2a8d3ff54aadbafdd057ba4844d410 (patch) | |
tree | 256d18f682949070a91d1ecd7c03299b7c0a8fbd /sys | |
parent | b5536200a02bcdc94f26224b20ee4400aafb10e0 (diff) |
The socket number diagnostic check was simply crying out for unsigned
arithmetic...
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sbus/stp4020.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/sbus/stp4020.c b/sys/dev/sbus/stp4020.c index 6617591db46..c9617ad0264 100644 --- a/sys/dev/sbus/stp4020.c +++ b/sys/dev/sbus/stp4020.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stp4020.c,v 1.11 2004/03/02 23:10:18 miod Exp $ */ +/* $OpenBSD: stp4020.c,v 1.12 2004/03/03 21:47:39 miod Exp $ */ /* $NetBSD: stp4020.c,v 1.23 2002/06/01 23:51:03 lukem Exp $ */ /*- @@ -308,7 +308,8 @@ stp4020_event_thread(arg) void *arg; { struct stp4020_softc *sc = arg; - int s, sense, socket; + int s, sense; + unsigned int socket; for (;;) { struct stp4020_socket *h; @@ -323,7 +324,7 @@ stp4020_event_thread(arg) sc->events &= ~(1 << socket); splx(s); - if (socket < 0 || socket >= STP4020_NSOCK) { + if (socket >= STP4020_NSOCK) { #ifdef DEBUG printf("stp4020_event_thread: wayward socket number %d\n", socket); |