Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net/npf simplify (and fix) logic.
details: https://anonhg.NetBSD.org/src/rev/d730b30e7133
branches: trunk
changeset: 341245:d730b30e7133
user: christos <christos%NetBSD.org@localhost>
date: Tue Oct 27 19:31:55 2015 +0000
description:
simplify (and fix) logic.
diffstat:
sys/net/npf/npf.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (59 lines):
diff -r 7086aa34a550 -r d730b30e7133 sys/net/npf/npf.c
--- a/sys/net/npf/npf.c Tue Oct 27 18:49:26 2015 +0000
+++ b/sys/net/npf/npf.c Tue Oct 27 19:31:55 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf.c,v 1.28 2015/10/19 09:28:24 martin Exp $ */
+/* $NetBSD: npf.c,v 1.29 2015/10/27 19:31:55 christos Exp $ */
/*-
* Copyright (c) 2009-2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.28 2015/10/19 09:28:24 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.29 2015/10/27 19:31:55 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -102,7 +102,6 @@
.d_flag = D_OTHER | D_MPSAFE
};
-#if !defined(MODULAR) || defined(_MODULE)
static int
npf_init(void)
{
@@ -137,7 +136,6 @@
return 0;
#endif
}
-#endif
static int
npf_fini(void)
@@ -177,7 +175,7 @@
switch (cmd) {
case MODULE_CMD_INIT:
-#if defined(_MODULE)
+#ifdef MODULAR
return npf_init();
#else
/* initialized by npfattach */
@@ -199,14 +197,12 @@
void
npfattach(int nunits)
{
-#ifdef MODULAR
+#ifndef MODULAR
/*
* Modular kernels will automatically load any built-in modules
* and call their modcmd() routine, so we don't need to do it
* again as part of pseudo-device configuration.
*/
- return;
-#else
(void)npf_init();
#endif
}
Home |
Main Index |
Thread Index |
Old Index