[PATCH linux-next] selftests: timers: Remove the unneeded result variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: ye xingchen <ye.xingchen@xxxxxxxxxx>

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

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: ye xingchen <ye.xingchen@xxxxxxxxxx>
---
 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



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux