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-prev] [day] [month] [year] [list]
Message-ID: <tip-5fc63f9577322d11019b6d357f73f5ce9031f263@git.kernel.org>
Date:   Fri, 31 Mar 2017 01:30:49 -0700
From:   tip-bot for Nicholas Mc Guire <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     tglx@...utronix.de, der.herr@...r.at, john.stultz@...aro.org,
        mingo@...nel.org, christopher.s.hall@...el.com, hpa@...or.com,
        linux-kernel@...r.kernel.org
Subject: [tip:timers/core] timekeeping: Remove pointless conversion to bool

Commit-ID:  5fc63f9577322d11019b6d357f73f5ce9031f263
Gitweb:     http://git.kernel.org/tip/5fc63f9577322d11019b6d357f73f5ce9031f263
Author:     Nicholas Mc Guire <der.herr@...r.at>
AuthorDate: Fri, 24 Mar 2017 20:03:35 +0100
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 31 Mar 2017 10:26:56 +0200

timekeeping: Remove pointless conversion to bool

interp_forward is type bool so assignment from a logical operation directly
is sufficient.

Signed-off-by: Nicholas Mc Guire <der.herr@...r.at>
Cc: "Christopher S. Hall" <christopher.s.hall@...el.com>
Cc: John Stultz <john.stultz@...aro.org>
Link: http://lkml.kernel.org/r/1490382215-30505-1-git-send-email-der.herr@hofr.at
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

---
 kernel/time/timekeeping.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 5b63a21..9652bc5 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -996,8 +996,7 @@ static int adjust_historical_crosststamp(struct system_time_snapshot *history,
 		return 0;
 
 	/* Interpolate shortest distance from beginning or end of history */
-	interp_forward = partial_history_cycles > total_history_cycles/2 ?
-		true : false;
+	interp_forward = partial_history_cycles > total_history_cycles / 2;
 	partial_history_cycles = interp_forward ?
 		total_history_cycles - partial_history_cycles :
 		partial_history_cycles;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ