aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/xntpd/lib/buftvtots.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/xntpd/lib/buftvtots.c')
-rw-r--r--usr.sbin/xntpd/lib/buftvtots.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/usr.sbin/xntpd/lib/buftvtots.c b/usr.sbin/xntpd/lib/buftvtots.c
index d9b484db2df0..7e1ec63a12f1 100644
--- a/usr.sbin/xntpd/lib/buftvtots.c
+++ b/usr.sbin/xntpd/lib/buftvtots.c
@@ -1,4 +1,4 @@
-/* buftvtots.c,v 3.1 1993/07/06 01:07:59 jbj Exp
+/*
* buftvtots - pull a Unix-format (struct timeval) time stamp out of
* an octet stream and convert it to a l_fp time stamp.
* This is useful when using the clock line discipline.
@@ -12,50 +12,50 @@ buftvtots(bufp, ts)
l_fp *ts;
{
register const u_char *bp;
- register U_LONG sec;
- register U_LONG usec;
+ register u_long sec;
+ register u_long usec;
#ifdef XNTP_BIG_ENDIAN
bp = (u_char *)bufp;
- sec = (U_LONG)*bp++ & 0xff;
+ sec = (u_long)*bp++ & 0xff;
sec <<= 8;
- sec += (U_LONG)*bp++ & 0xff;
+ sec += (u_long)*bp++ & 0xff;
sec <<= 8;
- sec += (U_LONG)*bp++ & 0xff;
+ sec += (u_long)*bp++ & 0xff;
sec <<= 8;
- sec += (U_LONG)*bp++ & 0xff;
+ sec += (u_long)*bp++ & 0xff;
- usec = (U_LONG)*bp++ & 0xff;
+ usec = (u_long)*bp++ & 0xff;
usec <<= 8;
- usec += (U_LONG)*bp++ & 0xff;
+ usec += (u_long)*bp++ & 0xff;
usec <<= 8;
- usec += (U_LONG)*bp++ & 0xff;
+ usec += (u_long)*bp++ & 0xff;
usec <<= 8;
- usec += (U_LONG)*bp & 0xff;
+ usec += (u_long)*bp & 0xff;
#else
bp = (u_char *)bufp + 7;
- usec = (U_LONG)*bp-- & 0xff;
+ usec = (u_long)*bp-- & 0xff;
usec <<= 8;
- usec += (U_LONG)*bp-- & 0xff;
+ usec += (u_long)*bp-- & 0xff;
usec <<= 8;
- usec += (U_LONG)*bp-- & 0xff;
+ usec += (u_long)*bp-- & 0xff;
usec <<= 8;
- usec += (U_LONG)*bp-- & 0xff;
+ usec += (u_long)*bp-- & 0xff;
- sec = (U_LONG)*bp-- & 0xff;
+ sec = (u_long)*bp-- & 0xff;
sec <<= 8;
- sec += (U_LONG)*bp-- & 0xff;
+ sec += (u_long)*bp-- & 0xff;
sec <<= 8;
- sec += (U_LONG)*bp-- & 0xff;
+ sec += (u_long)*bp-- & 0xff;
sec <<= 8;
- sec += (U_LONG)*bp & 0xff;
+ sec += (u_long)*bp & 0xff;
#endif
if (usec > 999999)
return 0;
- ts->l_ui = sec + (U_LONG)JAN_1970;
+ ts->l_ui = sec + (u_long)JAN_1970;
TVUTOTSF(usec, ts->l_uf);
return 1;
}