Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys rework the #ifdef IPSEC code to not use fallthru.
details: https://anonhg.NetBSD.org/src/rev/7224125e9fcd
branches: trunk
changeset: 448520:7224125e9fcd
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Feb 04 10:48:46 2019 +0000
description:
rework the #ifdef IPSEC code to not use fallthru.
same number of lines with more local context.
diffstat:
sys/netinet/ip_output.c | 10 +++++-----
sys/netinet6/ip6_output.c | 16 ++++++++--------
2 files changed, 13 insertions(+), 13 deletions(-)
diffs (75 lines):
diff -r ca484fe11d5f -r 7224125e9fcd sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Mon Feb 04 10:22:15 2019 +0000
+++ b/sys/netinet/ip_output.c Mon Feb 04 10:48:46 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.309 2018/12/22 13:11:38 maxv Exp $ */
+/* $NetBSD: ip_output.c,v 1.310 2019/02/04 10:48:46 mrg Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.309 2018/12/22 13:11:38 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.310 2019/02/04 10:48:46 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1238,9 +1238,9 @@
error = ipsec_set_policy(inp,
sopt->sopt_data, sopt->sopt_size,
curlwp->l_cred);
- break;
- }
- /*FALLTHROUGH*/
+ } else
+ error = ENOPROTOOPT;
+ break;
#endif /* IPSEC */
default:
diff -r ca484fe11d5f -r 7224125e9fcd sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Mon Feb 04 10:22:15 2019 +0000
+++ b/sys/netinet6/ip6_output.c Mon Feb 04 10:48:46 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_output.c,v 1.216 2018/12/22 14:28:57 maxv Exp $ */
+/* $NetBSD: ip6_output.c,v 1.217 2019/02/04 10:48:46 mrg Exp $ */
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.216 2018/12/22 14:28:57 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.217 2019/02/04 10:48:46 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1702,9 +1702,9 @@
error = ipsec_set_policy(in6p,
sopt->sopt_data, sopt->sopt_size,
kauth_cred_get());
- break;
- }
- /*FALLTHROUGH*/
+ } else
+ error = ENOPROTOOPT;
+ break;
#endif /* IPSEC */
default:
@@ -1910,9 +1910,9 @@
sopt->sopt_size, &m);
if (!error)
error = sockopt_setmbuf(sopt, m);
- break;
- }
- /*FALLTHROUGH*/
+ } else
+ error = ENOPROTOOPT;
+ break;
#endif /* IPSEC */
default:
Home |
Main Index |
Thread Index |
Old Index