diff options
Diffstat (limited to 'usr.sbin/xntpd/lib/clocktime.c')
-rw-r--r-- | usr.sbin/xntpd/lib/clocktime.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/xntpd/lib/clocktime.c b/usr.sbin/xntpd/lib/clocktime.c index 36b967e..0217f2b 100644 --- a/usr.sbin/xntpd/lib/clocktime.c +++ b/usr.sbin/xntpd/lib/clocktime.c @@ -1,4 +1,4 @@ -/* clocktime.c,v 3.1 1993/07/06 01:08:07 jbj Exp +/* * clocktime - compute the NTP date from a day of year, hour, minute * and second. */ @@ -34,21 +34,21 @@ clocktime(yday, hour, minute, second, tzoff, rec_ui, yearstart, ts_ui) int minute; int second; int tzoff; - U_LONG rec_ui; - U_LONG *yearstart; + u_long rec_ui; + u_long *yearstart; U_LONG *ts_ui; { - register LONG tmp; - register U_LONG date; - register U_LONG yst; + register long tmp; + register u_long date; + register u_long yst; /* * Compute the offset into the year in seconds. Note that * this could come out to be a negative number. */ - tmp = (LONG)(MULBY24((yday-1)) + hour + tzoff); - tmp = MULBY60(tmp) + (LONG)minute; - tmp = MULBY60(tmp) + (LONG)second; + tmp = (long)(MULBY24((yday-1)) + hour + tzoff); + tmp = MULBY60(tmp) + (long)minute; + tmp = MULBY60(tmp) + (long)second; /* * Initialize yearstart, if necessary. @@ -66,7 +66,7 @@ clocktime(yday, hour, minute, second, tzoff, rec_ui, yearstart, ts_ui) * Use the current year start for the first check, this should * work most of the time. */ - date = (U_LONG)(tmp + (LONG)yst); + date = (u_long)(tmp + (long)yst); if (date < (rec_ui + CLOSETIME) && date > (rec_ui - CLOSETIME)) { *ts_ui = date; @@ -79,7 +79,7 @@ clocktime(yday, hour, minute, second, tzoff, rec_ui, yearstart, ts_ui) */ yst = calyearstart(rec_ui); if (yst != *yearstart) { - date = (U_LONG)((LONG)yst + tmp); + date = (u_long)((long)yst + tmp); *ts_ui = date; if (date < (rec_ui + CLOSETIME) && date > (rec_ui - CLOSETIME)) { @@ -98,7 +98,7 @@ clocktime(yday, hour, minute, second, tzoff, rec_ui, yearstart, ts_ui) if ((rec_ui - yst) < TWODAYS) { yst = calyearstart(yst - TWODAYS); if (yst != *yearstart) { - date = (U_LONG)(tmp + (LONG)yst); + date = (u_long)(tmp + (long)yst); if (date < (rec_ui + CLOSETIME) && date > (rec_ui - CLOSETIME)) { *yearstart = yst; @@ -115,7 +115,7 @@ clocktime(yday, hour, minute, second, tzoff, rec_ui, yearstart, ts_ui) */ yst = calyearstart(rec_ui + TWODAYS); if (yst != *yearstart) { - date = (U_LONG)((LONG)yst + tmp); + date = (u_long)((long)yst + tmp); if (date < (rec_ui + CLOSETIME) && date > (rec_ui - CLOSETIME)) { *yearstart = yst; |