diff options
author | bde <bde@FreeBSD.org> | 1997-04-20 16:38:22 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-04-20 16:38:22 +0000 |
commit | 2d072e5f9d207912f63db40b062677c0507dbed5 (patch) | |
tree | 6d83d2dd376c810b976b23a5441a3003276ab4e3 /sys/i386/isa/pcvt/pcvt_drv.c | |
parent | 8784b3f4e891adb70e9eeb6b8e2a04741912409d (diff) | |
download | FreeBSD-src-2d072e5f9d207912f63db40b062677c0507dbed5.zip FreeBSD-src-2d072e5f9d207912f63db40b062677c0507dbed5.tar.gz |
Fixed the type of timeout functions and removed casts that hid the
type mismatches. There was no problem in practice (at least on 386's).
Don't cast NULL in calls to timeout functions. pcvt is fully prototyped
and doesn't support K&R.
Timeout functions take args of type `void *', so use magic numbers of
type `void *' for UPDATE_* to reduce the danger of wrong conversions.
Removed FreeBSD-pre-1.1-related TIMEOUT_FUNC_T macro. It was especially
bogus for the pre-1.1 case.
Diffstat (limited to 'sys/i386/isa/pcvt/pcvt_drv.c')
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_drv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index 506603a..10a93b8 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -776,7 +776,8 @@ int pcvt_kbd_rptr = 0; short pcvt_kbd_count= 0; static u_char pcvt_timeout_scheduled = 0; -static void pcvt_timeout (void *arg) +static void +pcvt_timeout(void *arg) { u_char *cp; @@ -891,7 +892,7 @@ pcrint(int unit) { PCVT_DISABLE_INTR (); pcvt_timeout_scheduled = 1; /* flag active */ - timeout((TIMEOUT_FUNC_T)pcvt_timeout, (caddr_t) 0, 1); /* fire off */ + timeout(pcvt_timeout, NULL, hz / 100); /* fire off */ PCVT_ENABLE_INTR (); } } |