diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-11-20 18:52:01 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-11-20 18:52:01 +0000 |
commit | 5514cce54eeb6b5b2fc4bc8ec005b474e563c9e2 (patch) | |
tree | 5116bee8052fbccf26146a95d6ddcdae6ba752ff /sys/arch/i386/isa/pcvt/pcvt_kbd.c | |
parent | 1c4a3676fce5aeb3e26ee82bb20b040dbda864d6 (diff) |
ioctl arguments are u_long.
Replaces `undefined' code with `defined' behavior...
gcc 2.96 performs switch cases range analysis, warns about unreachable
cases, and weeds them out.
In
switch(i) {
case VALUE:
}
VALUE is first coerced into the type of i. If i is signed, VALUE is
unsigned and exceeds i range, you lose... the result of the conversion
is undefined.
Diffstat (limited to 'sys/arch/i386/isa/pcvt/pcvt_kbd.c')
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_kbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c index 5add2e802c5..03d2ede8a0e 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_kbd.c,v 1.27 1999/10/07 02:43:08 aaron Exp $ */ +/* $OpenBSD: pcvt_kbd.c,v 1.28 1999/11/20 18:52:00 espie Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -1838,7 +1838,7 @@ setkeydef(Ovl_tbl *data) * keyboard ioctl's entry *---------------------------------------------------------------------------*/ int -kbdioctl(Dev_t dev, int cmd, caddr_t data, int flag) +kbdioctl(Dev_t dev, u_long cmd, caddr_t data, int flag) { int key; |