Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet CID 1363344: remove dead code



details:   https://anonhg.NetBSD.org/src/rev/446d80d23224
branches:  trunk
changeset: 816480:446d80d23224
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Jul 08 06:15:33 2016 +0000

description:
CID 1363344: remove dead code

We may need to reconsider a case when m_get_rcvif_psref returns NULL.

diffstat:

 sys/netinet/ip_input.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r c1b2fc161847 -r 446d80d23224 sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Fri Jul 08 05:38:31 2016 +0000
+++ b/sys/netinet/ip_input.c    Fri Jul 08 06:15:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.336 2016/07/07 09:32:02 ozaki-r Exp $   */
+/*     $NetBSD: ip_input.c,v 1.337 2016/07/08 06:15:33 ozaki-r Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.336 2016/07/07 09:32:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.337 2016/07/08 06:15:33 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1472,8 +1472,8 @@
        if (inpflags & INP_RECVIF) {
                struct sockaddr_dl sdl;
 
-               sockaddr_dl_init(&sdl, sizeof(sdl), ifp ?
-                   ifp->if_index : 0, 0, NULL, 0, NULL, 0);
+               sockaddr_dl_init(&sdl, sizeof(sdl), ifp->if_index, 0, NULL, 0,
+                   NULL, 0);
                *mp = sbcreatecontrol(&sdl, sdl.sdl_len, IP_RECVIF, IPPROTO_IP);
                if (*mp)
                        mp = &(*mp)->m_next;



Home | Main Index | Thread Index | Old Index