Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Work around pedantic compiler
details: https://anonhg.NetBSD.org/src/rev/d74a541bea3d
branches: trunk
changeset: 332672:d74a541bea3d
user: justin <justin%NetBSD.org@localhost>
date: Thu Oct 02 23:07:30 2014 +0000
description:
Work around pedantic compiler
diffstat:
sys/kern/kern_sysctl.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 16ea84038c2a -r d74a541bea3d sys/kern/kern_sysctl.c
--- a/sys/kern/kern_sysctl.c Thu Oct 02 22:05:38 2014 +0000
+++ b/sys/kern/kern_sysctl.c Thu Oct 02 23:07:30 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sysctl.c,v 1.253 2014/08/10 16:44:36 tls Exp $ */
+/* $NetBSD: kern_sysctl.c,v 1.254 2014/10/02 23:07:30 justin 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.253 2014/08/10 16:44:36 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.254 2014/10/02 23:07:30 justin Exp $");
#include "opt_defcorename.h"
#include "ksyms.h"
@@ -1636,6 +1636,7 @@
const struct sysctlnode *node;
struct sysctlnode nnode;
int error;
+ int sysctl_num;
if (SYSCTL_VERS(rnode->sysctl_flags) != SYSCTL_VERSION) {
printf("sysctl_mmap: rnode %p wrong version\n", rnode);
@@ -1663,7 +1664,8 @@
if (namelen != 1)
return (EOPNOTSUPP);
node = rnode;
- error = sysctl_locate(l, &nnode.sysctl_num, 1, &node, NULL);
+ sysctl_num = nnode.sysctl_num;
+ error = sysctl_locate(l, &sysctl_num, 1, &node, NULL);
if (error)
return (error);
Home |
Main Index |
Thread Index |
Old Index