lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  4 Aug 2021 13:15:30 +0100
From:   Colin King <colin.king@...onical.com>
To:     Jeremy Kerr <jk@...econstruct.com.au>,
        Matt Johnston <matt@...econstruct.com.au>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH][next] mctp: remove duplicated assignment of pointer hdr

From: Colin Ian King <colin.king@...onical.com>

The pointer hdr is being initialized and also re-assigned with the
same value from the call to function mctp_hdr. Static analysis reports
that the initializated value is unused. The second assignment is
duplicated and can be removed.

Addresses-Coverity: ("Unused value").
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
 net/mctp/af_mctp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c
index 84f722d31fd7..a9526ac29dff 100644
--- a/net/mctp/af_mctp.c
+++ b/net/mctp/af_mctp.c
@@ -170,7 +170,6 @@ static int mctp_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
 		/* TODO: expand mctp_skb_cb for header fields? */
 		struct mctp_hdr *hdr = mctp_hdr(skb);
 
-		hdr = mctp_hdr(skb);
 		addr = msg->msg_name;
 		addr->smctp_family = AF_MCTP;
 		addr->smctp_network = cb->net;
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ