Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern remove useless cast (Richard Hansen)
details: https://anonhg.NetBSD.org/src/rev/5014da1b94f6
branches: trunk
changeset: 784490:5014da1b94f6
user: christos <christos%NetBSD.org@localhost>
date: Tue Jan 29 19:56:43 2013 +0000
description:
remove useless cast (Richard Hansen)
diffstat:
sys/kern/kern_sysctl.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (40 lines):
diff -r f29847b3727e -r 5014da1b94f6 sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c Tue Jan 29 19:48:41 2013 +0000
+++ b/sys/kern/kern_sysctl.c Tue Jan 29 19:56:43 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sysctl.c,v 1.236 2012/06/06 05:10:54 matt Exp $ */
+/* $NetBSD: kern_sysctl.c,v 1.237 2013/01/29 19:56:43 christos Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.236 2012/06/06 05:10:54 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.237 2013/01/29 19:56:43 christos Exp $");
#include "opt_defcorename.h"
#include "ksyms.h"
@@ -223,7 +223,7 @@
void
sysctl_init(void)
{
- sysctl_setup_func * const *sysctl_setup, f;
+ sysctl_setup_func *const *sysctl_setup;
rw_init(&sysctl_treelock);
@@ -233,11 +233,7 @@
sysctl_root.sysctl_num = CREATE_BASE;
__link_set_foreach(sysctl_setup, sysctl_funcs) {
- /*
- * XXX - why do i have to coerce the pointers like this?
- */
- f = (void*)*sysctl_setup;
- (*f)(NULL);
+ (**sysctl_setup)(NULL);
}
mutex_init(&sysctl_file_marker_lock, MUTEX_DEFAULT, IPL_NONE);
Home |
Main Index |
Thread Index |
Old Index