From nobody Sun Apr 23 04:48:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q3wkd03Pfz46pZW; Sun, 23 Apr 2023 04:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q3wkc5lgMz3Ccc; Sun, 23 Apr 2023 04:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682225304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LdOiiZBIs77aQ/u/caix1tSzHwAEYg+LoQbva+347jk=; b=CAJsW+9+DNNSHQj03DIsdY7ClgebLjNXEie1JdjQqWY9U3BDXVV/HWgbw9lGD4+EjX38ox wxxFfk4Ww6aDNpkpYPJwTB2aLHsw4gGYU98KFTK04vzDt9Bh6H+Cm+GbbHNUkG+Se5rwds lpE6AxLpvPY8ZoJZvRHjrvrS9UL1/DwXgrCXJbPy/HMpdXc9w7y2HI+DGNEr0GaH6f3mJd ARBBShC64UnRRcBeCgA6xW83Q+pmYxU3L3dQ9xQa7H6pjpuBX921eHvQgw7IlgQspFYRu4 jT6Cbhh/R2590W08wRFbCUMEo50zCMUmCkuAP9CVi+iaR8SsrxkdgDAkWx9YzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682225304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LdOiiZBIs77aQ/u/caix1tSzHwAEYg+LoQbva+347jk=; b=TMYs6veiz31plrvqOZRh3GF/Ll7Jp/GeL4wBtrl/xgIyarxYUk/6qLN1kgSdNvSMavkpoc o5NXCCXhsJ4WC5Qt1w9HTrb4KHQ9Ggts6y3jUIgkMWrQHXSPfo/+mvolNNP7n3Tj3oVgcL O0Dd4t4hoa+IEmodeC2gua988ad4gR5+Ty9nh8yOiKYn7JTDCEnWpiJcHx1AbYXg2nArgz HvTH96BPad+JW8XGCixipJ6DVvv84coCuHiY5FcvACVpTDEmvEKj1CvhYuUQQC03Vy3V/z Fju7ByeSu7SLadNC0xqvo/6KEmGS2ls4NNkADOv+t/WSnPrlss6QS+YFIdrG/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682225304; a=rsa-sha256; cv=none; b=VP7lh61FitgPPkpxTJqi5ExTaobZxQwePXqwgxQ0WEG1Ua3LqdFISXzh6Ba6oAPOF0lDyf AIQoitaE37VAh1iAY64nECYS14DGjVWNueKeXhUqspf5hSBLEDui7UC+cXnB5KqPXeTzuz mxDb8r5BoPObxZDn6TRdjS/xkFj7UHNE46jsYtoFBgX0sfCIJwMXvY8oUrYhLfRRFCKEqZ hu8dpaTpl2lpw63XPnuUCyA3pJRuCTF/gCO6MgrfzF2vUGHNEAGANZcMvSuSoeoUaSafJl fA4HNMpbTFE3gSWA7Y6N+85loy7+yLkuYc5mB4jn2utbOofZbkkxRHKt2wgIjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q3wkc3z6FzVrF; Sun, 23 Apr 2023 04:48:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33N4mOVO022731; Sun, 23 Apr 2023 04:48:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33N4mOTi022730; Sun, 23 Apr 2023 04:48:24 GMT (envelope-from git) Date: Sun, 23 Apr 2023 04:48:24 GMT Message-Id: <202304230448.33N4mOTi022730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: b658c0fce10a - main - ip_mroute: Delete unreachable code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b658c0fce10a06493dc468fc9f6699120473e17b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b658c0fce10a06493dc468fc9f6699120473e17b commit b658c0fce10a06493dc468fc9f6699120473e17b Author: Zhenlei Huang AuthorDate: 2023-04-23 04:47:57 +0000 Commit: Zhenlei Huang CommitDate: 2023-04-23 04:47:57 +0000 ip_mroute: Delete unreachable code As the flag M_WAITOK is passed to ip_encap_attach(), then the function will never return NULL, and the following code within NULL check branch will be unreachable. No functional change intended. Reviewed by: kp Fixes: 6d8fdfa9d5e7d Rework IP encapsulation handling code MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D39746 --- sys/netinet/ip_mroute.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index 15abe168e5c2..ac5e1c5f09c6 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -2821,11 +2821,6 @@ ip_mroute_modevent(module_t mod, int type, void *unused) &pim_squelch_wholepkt); pim_encap_cookie = ip_encap_attach(&ipv4_encap_cfg, NULL, M_WAITOK); - if (pim_encap_cookie == NULL) { - printf("ip_mroute: unable to attach pim encap\n"); - MRW_LOCK_DESTROY(); - return (EINVAL); - } ip_mcast_src = X_ip_mcast_src; ip_mforward = X_ip_mforward;