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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231228030854.11689-1-zeming@nfschina.com>
Date: Thu, 28 Dec 2023 11:08:54 +0800
From: Li zeming <zeming@...china.com>
To: serge@...lyn.com
Cc: linux-security-module@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Li zeming <zeming@...china.com>
Subject: [PATCH] kernel: capability: Remove unnecessary ‘0’ values from ret

The ret variable is assigned when it does not need to be defined, as it
has already been assigned before use.

Signed-off-by: Li zeming <zeming@...china.com>
---
 kernel/capability.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/capability.c b/kernel/capability.c
index dac4df77e376e..ed8a983e21da4 100644
--- a/kernel/capability.c
+++ b/kernel/capability.c
@@ -140,7 +140,7 @@ static inline int cap_get_target_pid(pid_t pid, kernel_cap_t *pEp,
  */
 SYSCALL_DEFINE2(capget, cap_user_header_t, header, cap_user_data_t, dataptr)
 {
-	int ret = 0;
+	int ret;
 	pid_t pid;
 	unsigned tocopy;
 	kernel_cap_t pE, pI, pP;
-- 
2.18.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ