Module Name:    xsrc
Committed By:   mrg
Date:           Mon Mar  4 08:28:59 UTC 2019

Modified Files:
        xsrc/external/mit/xclock/dist: Clock.c

Log Message:
- add likely missing () around || expression.
- use fabsl() not abs().

both picked up by clang and the new xclock.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6 -r1.2 xsrc/external/mit/xclock/dist/Clock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xclock/dist/Clock.c
diff -u xsrc/external/mit/xclock/dist/Clock.c:1.1.1.6 xsrc/external/mit/xclock/dist/Clock.c:1.2
--- xsrc/external/mit/xclock/dist/Clock.c:1.1.1.6	Sun Mar  3 08:16:14 2019
+++ xsrc/external/mit/xclock/dist/Clock.c	Mon Mar  4 08:28:59 2019
@@ -1610,8 +1610,8 @@ clock_tic(XtPointer client_data, XtInter
 				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);
@@ -2173,10 +2173,10 @@ SetValues(Widget gcurrent, Widget greque
 	  if (new->clock.update && XtIsRealized( (Widget) new))
 	      new->clock.interval_id = XtAppAddTimeOut(
                                          XtWidgetToApplicationContext(gnew),
-					 abs(new->clock.update)*1000,
+					 fabsl(new->clock.update)*1000,
 				         clock_tic, (XtPointer)gnew);
 
-	  new->clock.show_second_hand =(abs(new->clock.update) <= SECOND_HAND_TIME);
+	  new->clock.show_second_hand =(fabsl(new->clock.update) <= SECOND_HAND_TIME);
 	  if (new->clock.show_second_hand != current->clock.show_second_hand)
 	    redisplay = TRUE;
       }

Reply via email to