Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Using "int" variables with sysctl's CTLTYPE_BOOL is...



details:   https://anonhg.NetBSD.org/src/rev/5eaee35431fb
branches:  trunk
changeset: 760848:5eaee35431fb
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jan 14 10:18:21 2011 +0000

description:
Using "int" variables with sysctl's CTLTYPE_BOOL is a simple receipt to
loose on big endian machines. So make the variables "bool".

diffstat:

 sys/kern/kern_module.c   |  8 ++++----
 sys/kern/subr_autoconf.c |  6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r 64d03e1cedb7 -r 5eaee35431fb sys/kern/kern_module.c
--- a/sys/kern/kern_module.c    Fri Jan 14 10:08:57 2011 +0000
+++ b/sys/kern/kern_module.c    Fri Jan 14 10:18:21 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_module.c,v 1.74 2010/12/29 15:07:36 pooka Exp $   */
+/*     $NetBSD: kern_module.c,v 1.75 2011/01/14 10:18:21 martin Exp $  */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.74 2010/12/29 15:07:36 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.75 2011/01/14 10:18:21 martin Exp $");
 
 #define _MODULE_INTERNAL
 
@@ -67,8 +67,8 @@
 static struct modlist module_bootlist = TAILQ_HEAD_INITIALIZER(module_bootlist);
 
 static module_t        *module_active;
-static int     module_verbose_on;
-static int     module_autoload_on = 1;
+static bool    module_verbose_on;
+static bool    module_autoload_on = true;
 u_int          module_count;
 u_int          module_builtinlist;
 u_int          module_autotime = 10;
diff -r 64d03e1cedb7 -r 5eaee35431fb sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Fri Jan 14 10:08:57 2011 +0000
+++ b/sys/kern/subr_autoconf.c  Fri Jan 14 10:18:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.209 2010/08/16 17:29:52 jruoho Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.210 2011/01/14 10:18:21 martin Exp $ */
 
 /*
  * Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.209 2010/08/16 17:29:52 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.210 2011/01/14 10:18:21 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -228,7 +228,7 @@
 static kmutex_t config_misc_lock;
 static kcondvar_t config_misc_cv;
 
-static int detachall = 0;
+static bool detachall = false;
 
 #define        STREQ(s1, s2)                   \
        (*(s1) == *(s2) && strcmp((s1), (s2)) == 0)



Home | Main Index | Thread Index | Old Index