[PATCH] exec: Delete unnecessary statements in remove_arg_zero()

Li kunyu posted 1 patch 1 year, 11 months ago
fs/exec.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] exec: Delete unnecessary statements in remove_arg_zero()
Posted by Li kunyu 1 year, 11 months ago
'ret=0; ' In actual operation, the ret was not modified, so this
sentence can be removed.

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 fs/exec.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/exec.c b/fs/exec.c
index 7be0527f5ff25..10309a93d9c52 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1747,7 +1747,6 @@ int remove_arg_zero(struct linux_binprm *bprm)
 
 	bprm->p++;
 	bprm->argc--;
-	ret = 0;
 
 out:
 	return ret;
-- 
2.18.2
Re: [PATCH] exec: Delete unnecessary statements in remove_arg_zero()
Posted by Kees Cook 1 year, 11 months ago
On Tue, 20 Feb 2024 13:24:26 +0800, Li kunyu wrote:
> 'ret=0; ' In actual operation, the ret was not modified, so this
> sentence can be removed.
> 
> 

Applied to for-next/execve, thanks!

[1/1] exec: Delete unnecessary statements in remove_arg_zero()
      https://git.kernel.org/kees/c/d3f0d7bbaefd

Take care,

-- 
Kees Cook