From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 4 19:50:03 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 150FA869 for ; Wed, 4 Sep 2013 19:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFAEE2F5A for ; Wed, 4 Sep 2013 19:50:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r84Jo2GA045272 for ; Wed, 4 Sep 2013 19:50:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r84Jo261045271; Wed, 4 Sep 2013 19:50:02 GMT (envelope-from gnats) Resent-Date: Wed, 4 Sep 2013 19:50:02 GMT Resent-Message-Id: <201309041950.r84Jo261045271@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sven-Thorsten Dietrich Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 346D75FB for ; Wed, 4 Sep 2013 19:44:52 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 220622F31 for ; Wed, 4 Sep 2013 19:44:52 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r84JipRI054655 for ; Wed, 4 Sep 2013 19:44:51 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r84JipP9054654; Wed, 4 Sep 2013 19:44:51 GMT (envelope-from nobody) Message-Id: <201309041944.r84JipP9054654@oldred.freebsd.org> Date: Wed, 4 Sep 2013 19:44:51 GMT From: Sven-Thorsten Dietrich To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/181822: drop dead / unused code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 19:50:03 -0000 >Number: 181822 >Category: kern >Synopsis: drop dead / unused code >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 04 19:50:02 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Sven-Thorsten Dietrich >Release: HEAD >Organization: Vyatta >Environment: >Description: struct ifr is never used, after making assignments to it's elements. Drop the relevant code. >How-To-Repeat: >Fix: see patch Patch attached with submission follows: struct ifr is never used, after making assignments to it's elements. Drop the relevant code. Signed-off-by: Sven-Throsten Dietrich Index: netinet/ip_mroute.c =================================================================== --- netinet/ip_mroute.c (revision 255189) +++ netinet/ip_mroute.c (working copy) @@ -707,7 +706,6 @@ vifi_t vifi; int i; struct ifnet *ifp; - struct ifreq ifr; MROUTER_LOCK(); @@ -732,11 +730,6 @@ for (vifi = 0; vifi < V_numvifs; vifi++) { if (!in_nullhost(V_viftable[vifi].v_lcl_addr) && !(V_viftable[vifi].v_flags & (VIFF_TUNNEL | VIFF_REGISTER))) { - struct sockaddr_in *so = (struct sockaddr_in *)&(ifr.ifr_addr); - - so->sin_len = sizeof(struct sockaddr_in); - so->sin_family = AF_INET; - so->sin_addr.s_addr = INADDR_ANY; ifp = V_viftable[vifi].v_ifp; if_allmulti(ifp, 0); } >Release-Note: >Audit-Trail: >Unformatted: