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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 23 May 2020 23:49:31 +0800
From:   Kaitao Cheng <pilgrimtao@...il.com>
To:     adobriyan@...il.com
Cc:     pilgrimtao@...il.com, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, songmuchun@...edance.com
Subject: [PATCH] proc/fd: Remove the initialization of variables in seq_show()

The variables{files, file} will definitely be assigned,
so we don't need to initialize them.

Signed-off-by: Kaitao Cheng <pilgrimtao@...il.com>
---
 fs/proc/fd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/proc/fd.c b/fs/proc/fd.c
index 81882a13212d..6f95baf44e37 100644
--- a/fs/proc/fd.c
+++ b/fs/proc/fd.c
@@ -19,9 +19,9 @@
 
 static int seq_show(struct seq_file *m, void *v)
 {
-	struct files_struct *files = NULL;
+	struct files_struct *files;
 	int f_flags = 0, ret = -ENOENT;
-	struct file *file = NULL;
+	struct file *file;
 	struct task_struct *task;
 
 	task = get_proc_task(m->private);
-- 
2.20.1

Powered by blists - more mailing lists