Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

src: Remove useless DIAGNOSTIC block, the caller already ensures...



details:   https://anonhg.NetBSD.org/src/rev/20127e48a724
branches:  trunk
changeset: 318196:20127e48a724
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Apr 15 08:31:18 2018 +0000
description:
Remove useless DIAGNOSTIC block, the caller already ensures the
assumptions, and here we're not doing anything (it should be a panic
rather than a printf).

diffstat:

 sys/netinet6/ip6_input.c |  16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diffs (37 lines):

diff -r a880bdb641f8 -r 20127e48a724 sys/netinet6/ip6_input.c
--- a/sys/netinet6/ip6_input.c  Sun Apr 15 08:27:21 2018 +0000
+++ b/sys/netinet6/ip6_input.c  Sun Apr 15 08:31:18 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_input.c,v 1.197 2018/04/15 07:35:49 maxv Exp $     */
+/*     $NetBSD: ip6_input.c,v 1.198 2018/04/15 08:31:18 maxv 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.197 2018/04/15 07:35:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.198 2018/04/15 08:31:18 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_gateway.h"
@@ -1318,18 +1318,6 @@
        size_t elen;
        struct mbuf *n;
 
-#ifdef DIAGNOSTIC
-       switch (nxt) {
-       case IPPROTO_DSTOPTS:
-       case IPPROTO_ROUTING:
-       case IPPROTO_HOPOPTS:
-       case IPPROTO_AH: /* is it possible? */
-               break;
-       default:
-               printf("ip6_pullexthdr: invalid nxt=%d\n", nxt);
-       }
-#endif
-
        m_copydata(m, off, sizeof(ip6e), (void *)&ip6e);
        if (nxt == IPPROTO_AH)
                elen = (ip6e.ip6e_len + 2) << 2;



Home | Main Index | Thread Index | Old Index