summaryrefslogtreecommitdiff
path: root/Clock.c
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@daemonic.se>2019-02-27 15:22:41 +0100
committerNiclas Zeising <zeising@daemonic.se>2019-02-27 15:22:41 +0100
commita212539500a17f265815e77b9a6047279824315f (patch)
tree7df6af066e91f81a4bc3d67dd0b2ef139f89403a /Clock.c
parent9af0790d71fc321d97486aa40b055656d99050c2 (diff)
Fix logic sourrouning && and ||
Fix the logic sorrounding && and ||. && has higher precedence than ||, and as such, the if statement probably was incorrect. Fix this by adding parenthesises around the || statement.
Diffstat (limited to 'Clock.c')
-rw-r--r--Clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Clock.c b/Clock.c
index e3f8f2b..bbfed20 100644
--- a/Clock.c
+++ b/Clock.c
@@ -1610,8 +1610,8 @@ clock_tic(XtPointer client_data, XtIntervalId *id)
RenderHands (w, &tm, False);
}
if (w->clock.show_second_hand &&
- tm.tm_sec != w->clock.otm.tm_sec ||
- tv.tv_usec != w->clock.otv.tv_usec)
+ (tm.tm_sec != w->clock.otm.tm_sec ||
+ tv.tv_usec != w->clock.otv.tv_usec))
{
RenderSec (w, &w->clock.otm, &w->clock.otv, False);
RenderSec (w, &tm, &tv, False);