Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/ipf/netinet Rearrange code to avoid testing...
details: https://anonhg.NetBSD.org/src/rev/b9fa8efc9cbf
branches: trunk
changeset: 346548:b9fa8efc9cbf
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Mon Jul 18 21:07:30 2016 +0000
description:
Rearrange code to avoid testing an error value that has not been set.
Also, for the built-in case, rather than re-inserting our devsw and
then ignoring the EEXIST error, don't bother re-inserting.
CID 1364140
diffstat:
sys/external/bsd/ipf/netinet/ip_fil_netbsd.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
diffs (41 lines):
diff -r 5f0c89edf9c9 -r b9fa8efc9cbf sys/external/bsd/ipf/netinet/ip_fil_netbsd.c
--- a/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c Mon Jul 18 21:03:01 2016 +0000
+++ b/sys/external/bsd/ipf/netinet/ip_fil_netbsd.c Mon Jul 18 21:07:30 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_fil_netbsd.c,v 1.17 2016/07/17 02:02:01 pgoyette Exp $ */
+/* $NetBSD: ip_fil_netbsd.c,v 1.18 2016/07/18 21:07:30 pgoyette Exp $ */
/*
* Copyright (C) 2012 by Darren Reed.
@@ -8,7 +8,7 @@
#if !defined(lint)
#if defined(__NetBSD__)
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.17 2016/07/17 02:02:01 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_fil_netbsd.c,v 1.18 2016/07/18 21:07:30 pgoyette Exp $");
#else
static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_fil_netbsd.c,v 1.1.1.2 2012/07/22 13:45:17 darrenr Exp";
@@ -2202,20 +2202,12 @@
#ifdef _MODULE
/*
- * Insert ourself into the cdevsw list. It's OK if we are
- * already there, since this will happen when our module is
- * built-in to the kernel. (We could skip the insert in
- * that case, but that would break the possibility of a
- * unload/re-load sequence for the built-in module, which
- * corresponds to disable/re-enable.)
+ * Insert ourself into the cdevsw list.
*/
error = devsw_attach("ipl", NULL, &ipl_bmaj, &ipl_cdevsw, &ipl_cmaj);
- if (error == EEXIST)
- error = 0;
-#endif
-
if (error)
ipl_fini(opaque);
+#endif
return error;
}
Home |
Main Index |
Thread Index |
Old Index