]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add proper const keywords to sysctl(3) parameters.
authorEd Schouten <ed@FreeBSD.org>
Sun, 21 Feb 2010 13:57:02 +0000 (13:57 +0000)
committerEd Schouten <ed@FreeBSD.org>
Sun, 21 Feb 2010 13:57:02 +0000 (13:57 +0000)
commit62399df2c9583c770e3dc236c817684f669f7e00
treefcb4fe1d12f11b6cab916731649d8e0d8c2645b0
parentebae8e93f7c311ac1c5c3f7c2428fef0a1a201f1
Add proper const keywords to sysctl(3) parameters.

The `name' and `newp' arguments can be marked const, because the buffers
they refer to are never changed. While there, perform some other
cleanups:

- Remove K&R from sysctl.c.
- Implement sysctlbyname() using sysctlnametomib() to prevent
  duplication of an undocumented kernel interface.
- Fix some whitespace nits.

It seems the prototypes are now in sync with NetBSD as well.
lib/libc/gen/sysctl.3
lib/libc/gen/sysctl.c
lib/libc/gen/sysctlbyname.c
lib/libc/gen/sysctlnametomib.c
sys/sys/sysctl.h