Skip to contentSkip to conversation

rpc: remove redundant initialization of variable status

PATCH Applied Colin King 2 participants 2 messages Jun 13, 2021 – Jun 14, 2021

Subsystems (5)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 rpc: remove redundant initialization of variable status

From: Colin Ian King <[email protected]>

The variable status is being initialized with a value that is never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 net/sunrpc/auth_gss/svcauth_gss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/auth_gss/svcauth_gss.c +1 -1
index 6dff64374bfe..a81be45f40d9 100644
@@ -1275,7 +1275,7 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
 	long long ctxh;
 	struct gss_api_mech *gm = NULL;
 	time64_t expiry;
-	int status = -EINVAL;
+	int status;
 
 	memset(&rsci, 0, sizeof(rsci));
 	/* context handle */
Signature · 1 line
2.31.1
#1 lore raw

Thanks, applied.--b.

Quoted 26 lines · Colin King

From: Colin Ian King <[email protected]>

The variable status is being initialized with a value that is never read, the assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 net/sunrpc/auth_gss/svcauth_gss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/auth_gss/svcauth_gss.c +1 -1
index 6dff64374bfe..a81be45f40d9 100644
@@ -1275,7 +1275,7 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
 	long long ctxh;
 	struct gss_api_mech *gm = NULL;
 	time64_t expiry;
-	int status = -EINVAL;
+	int status;
 
 	memset(&rsci, 0, sizeof(rsci));
 	/* context handle */
Signature · 1 line
2.31.1