Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Replace DIAGNOSTIC + panic with CTASSERT
details: https://anonhg.NetBSD.org/src/rev/2abb0751aa18
branches: trunk
changeset: 352067:2abb0751aa18
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Mar 14 04:24:04 2017 +0000
description:
Replace DIAGNOSTIC + panic with CTASSERT
diffstat:
sys/netinet6/icmp6.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (30 lines):
diff -r 45bc6acf438a -r 2abb0751aa18 sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c Tue Mar 14 04:23:15 2017 +0000
+++ b/sys/netinet6/icmp6.c Tue Mar 14 04:24:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icmp6.c,v 1.210 2017/02/17 03:57:17 ozaki-r Exp $ */
+/* $NetBSD: icmp6.c,v 1.211 2017/03/14 04:24:04 ozaki-r Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.210 2017/02/17 03:57:17 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.211 2017/03/14 04:24:04 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2074,10 +2074,7 @@
* If there are extra headers between IPv6 and ICMPv6, strip
* off that header first.
*/
-#ifdef DIAGNOSTIC
- if (sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr) > MHLEN)
- panic("assumption failed in icmp6_reflect");
-#endif
+ CTASSERT(sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr) <= MHLEN);
if (off > sizeof(struct ip6_hdr)) {
size_t l;
struct ip6_hdr nip6;
Home |
Main Index |
Thread Index |
Old Index