Module Name: src
Committed By: ozaki-r
Date: Tue Nov 1 10:32:57 UTC 2016
Modified Files:
src/sys/netinet6: ip6_input.c
Log Message:
Reduce the number of return points
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/netinet6/ip6_input.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet6/ip6_input.c
diff -u src/sys/netinet6/ip6_input.c:1.169 src/sys/netinet6/ip6_input.c:1.170
--- src/sys/netinet6/ip6_input.c:1.169 Tue Oct 18 07:30:31 2016
+++ src/sys/netinet6/ip6_input.c Tue Nov 1 10:32:57 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_input.c,v 1.169 2016/10/18 07:30:31 ozaki-r Exp $ */
+/* $NetBSD: ip6_input.c,v 1.170 2016/11/01 10:32:57 ozaki-r Exp $ */
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.169 2016/10/18 07:30:31 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.170 2016/11/01 10:32:57 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_gateway.h"
@@ -701,14 +701,11 @@ ip6_input(struct mbuf *m, struct ifnet *
if (error != 0) {
IP6_STATINC(IP6_STAT_CANTFORWARD);
- m_freem(m);
- return;
+ goto bad;
}
}
- if (!ours) {
- m_freem(m);
- return;
- }
+ if (!ours)
+ goto bad;
} else if (!ours) {
ip6_forward(m, srcrt);
return;