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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 15 Jan 2024 11:56:14 +0800
From: Li zeming <zeming@...china.com>
To: mcgrof@...nel.org,
	keescook@...omium.org,
	yzaikin@...gle.com
Cc: linux-kernel@...r.kernel.org,
	linux-fsdevel@...r.kernel.org,
	Li zeming <zeming@...china.com>
Subject: [PATCH] proc: proc_sysctl: Optimize proc_sys_fill_cache() variable

The ino and type variables are assigned values before use, and they do
not need to be assigned values when defined.

Signed-off-by: Li zeming <zeming@...china.com>
---
 fs/proc/proc_sysctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index c88854df0b624..cdda684551599 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -683,8 +683,8 @@ static bool proc_sys_fill_cache(struct file *file,
 	struct dentry *child, *dir = file->f_path.dentry;
 	struct inode *inode;
 	struct qstr qname;
-	ino_t ino = 0;
-	unsigned type = DT_UNKNOWN;
+	ino_t ino;
+	unsigned type;
 
 	qname.name = table->procname;
 	qname.len  = strlen(table->procname);
-- 
2.18.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ