summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pci/hda/hdac.c
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/dev/sound/pci/hda/hdac.c
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/dev/sound/pci/hda/hdac.c')
-rw-r--r--sys/dev/sound/pci/hda/hdac.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index 7ae9342..4968900 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -5723,7 +5723,7 @@ sysctl_hdac_polling(SYSCTL_HANDLER_ARGS)
hdac_lock(sc);
val = sc->polling;
hdac_unlock(sc);
- err = sysctl_handle_int(oidp, &val, sizeof(val), req);
+ err = sysctl_handle_int(oidp, &val, 0, req);
if (err != 0 || req->newptr == NULL)
return (err);
@@ -5782,7 +5782,7 @@ sysctl_hdac_polling_interval(SYSCTL_HANDLER_ARGS)
hdac_lock(sc);
val = ((uint64_t)sc->poll_ival * 1000) / hz;
hdac_unlock(sc);
- err = sysctl_handle_int(oidp, &val, sizeof(val), req);
+ err = sysctl_handle_int(oidp, &val, 0, req);
if (err != 0 || req->newptr == NULL)
return (err);
@@ -5822,7 +5822,7 @@ sysctl_hdac_dump(SYSCTL_HANDLER_ARGS)
devinfo->codec->sc == NULL)
return (EINVAL);
val = 0;
- err = sysctl_handle_int(oidp, &val, sizeof(val), req);
+ err = sysctl_handle_int(oidp, &val, 0, req);
if (err != 0 || req->newptr == NULL || val == 0)
return (err);
sc = devinfo->codec->sc;
OpenPOWER on IntegriCloud