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]
Date:   Tue, 20 Sep 2022 06:32:02 +0000
From:   cgel.zte@...il.com
To:     shuah@...nel.org
Cc:     jstultz@...gle.com, tglx@...utronix.de, sboyd@...nel.org,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] selftests: timers: Remove the unneeded result variable

From: ye xingchen <ye.xingchen@....com.cn>

Return the value adjtimex() directly instead of storing it in another
redundant variable.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
 tools/testing/selftests/timers/valid-adjtimex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/testing/selftests/timers/valid-adjtimex.c b/tools/testing/selftests/timers/valid-adjtimex.c
index 48b9a803235a..4bca39e0bd16 100644
--- a/tools/testing/selftests/timers/valid-adjtimex.c
+++ b/tools/testing/selftests/timers/valid-adjtimex.c
@@ -50,12 +50,10 @@ int clock_adjtime(clockid_t id, struct timex *tx)
 int clear_time_state(void)
 {
 	struct timex tx;
-	int ret;
 
 	tx.modes = ADJ_STATUS;
 	tx.status = 0;
-	ret = adjtimex(&tx);
-	return ret;
+	return adjtimex(&tx);
 }
 
 #define NUM_FREQ_VALID 32
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ