summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2007-06-04 18:25:08 +0000
committerdwmalone <dwmalone@FreeBSD.org>2007-06-04 18:25:08 +0000
commit771efb08f5bfaf22da0498ae91647fdecb3cc6bb (patch)
treee4320a83dea3de4df605896db823e0af0f883364 /sys/pc98/cbus
parent360dc5b21c582598a9aaf5b3cd6f3832b847ef41 (diff)
downloadFreeBSD-src-771efb08f5bfaf22da0498ae91647fdecb3cc6bb.zip
FreeBSD-src-771efb08f5bfaf22da0498ae91647fdecb3cc6bb.tar.gz
Despite several examples in the kernel, the third argument of
sysctl_handle_int is not sizeof the int type you want to export. The type must always be an int or an unsigned int. Remove the instances where a sizeof(variable) is passed to stop people accidently cut and pasting these examples. In a few places this was sysctl_handle_int was being used on 64 bit types, which would truncate the value to be exported. In these cases use sysctl_handle_quad to export them and change the format to Q so that sysctl(1) can still print them.
Diffstat (limited to 'sys/pc98/cbus')
-rw-r--r--sys/pc98/cbus/clock.c2
-rw-r--r--sys/pc98/cbus/pcrtc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/pc98/cbus/clock.c b/sys/pc98/cbus/clock.c
index 7b8e982..874109a 100644
--- a/sys/pc98/cbus/clock.c
+++ b/sys/pc98/cbus/clock.c
@@ -728,7 +728,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS)
* is is too generic. Should use it everywhere.
*/
freq = timer_freq;
- error = sysctl_handle_int(oidp, &freq, sizeof(freq), req);
+ error = sysctl_handle_int(oidp, &freq, 0, req);
if (error == 0 && req->newptr != NULL)
set_timer_freq(freq, hz);
return (error);
diff --git a/sys/pc98/cbus/pcrtc.c b/sys/pc98/cbus/pcrtc.c
index 7b8e982..874109a 100644
--- a/sys/pc98/cbus/pcrtc.c
+++ b/sys/pc98/cbus/pcrtc.c
@@ -728,7 +728,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS)
* is is too generic. Should use it everywhere.
*/
freq = timer_freq;
- error = sysctl_handle_int(oidp, &freq, sizeof(freq), req);
+ error = sysctl_handle_int(oidp, &freq, 0, req);
if (error == 0 && req->newptr != NULL)
set_timer_freq(freq, hz);
return (error);
OpenPOWER on IntegriCloud