diff options
author | peter <peter@FreeBSD.org> | 1999-05-06 18:39:32 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-05-06 18:39:32 +0000 |
commit | daa969b0667e983bbabc44c8ddcda321b70523c5 (patch) | |
tree | 82f0ee7becf00c3670d742c63db674ed9f2bee09 /sys/i386/isa/joy.c | |
parent | 6823e815bb122c9f00c61226c6be6cd590c34c34 (diff) | |
download | FreeBSD-src-daa969b0667e983bbabc44c8ddcda321b70523c5.zip FreeBSD-src-daa969b0667e983bbabc44c8ddcda321b70523c5.tar.gz |
The joypart() macro had a precedence bug. Add seatbelts for UNIT() too.
Diffstat (limited to 'sys/i386/isa/joy.c')
-rw-r--r-- | sys/i386/isa/joy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/isa/joy.c b/sys/i386/isa/joy.c index 2561cd2..5d4a7c2 100644 --- a/sys/i386/isa/joy.c +++ b/sys/i386/isa/joy.c @@ -65,8 +65,8 @@ #define ticks2usec(u) (((u) * 3433)>>12) -#define joypart(d) minor(d)&1 -#define UNIT(d) minor(d)>>1&3 +#define joypart(d) (minor(d)&1) +#define UNIT(d) ((minor(d)>>1)&3) #ifndef JOY_TIMEOUT #define JOY_TIMEOUT 2000 /* 2 milliseconds */ #endif |