Skip to contentSkip to conversation

proc: remove a pointless assignment

PATCH New Sudip Mukherjee 1 participant 1 message Sep 30, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 proc: remove a pointless assignment

The variable 'env_start' has only been used for the if condition before this assignment and is never read after this.
So, remove the assignement.

---
 fs/proc/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/base.c +1 -1
index aa69c35d904c..238925ff3a80 100644
@@ -279,7 +279,7 @@ static ssize_t get_mm_cmdline(struct mm_struct *mm, char __user *buf,
 	 * only when it overflows into the environment area.
 	 */
 	if (env_start != arg_end || env_end < env_start)
-		env_start = env_end = arg_end;
+		env_end = arg_end;
 	len = env_end - arg_start;
 
 	/* We're not going to care if "*ppos" has high bits set */
Signature · 1 line
2.11.0