summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rdate/ntpleaps.c
diff options
context:
space:
mode:
authorjakob <jakob@openbsd.org>2002-07-31 12:48:46 +0000
committerjakob <jakob@openbsd.org>2002-07-31 12:48:46 +0000
commitc81dd12eedd7ef5531dfabe9ad4719633975686c (patch)
treecb48a3b4c7b20580d4521663f107a40a6c976cdb /usr.sbin/rdate/ntpleaps.c
parentsync to libc calloc() (diff)
downloadwireguard-openbsd-c81dd12eedd7ef5531dfabe9ad4719633975686c.tar.xz
wireguard-openbsd-c81dd12eedd7ef5531dfabe9ad4719633975686c.zip
minor changes and knf from thorsten glaser
Diffstat (limited to 'usr.sbin/rdate/ntpleaps.c')
-rw-r--r--usr.sbin/rdate/ntpleaps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rdate/ntpleaps.c b/usr.sbin/rdate/ntpleaps.c
index 39d83a6ab72..f697008994c 100644
--- a/usr.sbin/rdate/ntpleaps.c
+++ b/usr.sbin/rdate/ntpleaps.c
@@ -1,4 +1,4 @@
-/* $Id: ntpleaps.c,v 1.2 2002/07/30 23:28:14 deraadt Exp $ */
+/* $OpenBSD: ntpleaps.c,v 1.3 2002/07/31 12:48:46 jakob Exp $ */
/*
* Copyright (c) 2002 by Thorsten "mirabile" Glaser <x86@ePOST.de>
@@ -21,7 +21,7 @@
/* Leap second support for NTP clients (generic) */
-static const char RCSId[] = "$OpenBSD: ntpleaps.c,v 1.2 2002/07/30 23:28:14 deraadt Exp $";
+static const char RCSId[] = "$OpenBSD: ntpleaps.c,v 1.3 2002/07/31 12:48:46 jakob Exp $";
/* I could include tzfile.h, but this would make the code unportable
@@ -144,7 +144,7 @@ ntpleaps_read(void)
for (m1 = 0; m1 < r; m1++) {
read(fd, buf, 8);
m2 = ntohl(*((u_int32_t *)buf));
- s = NTPLEAPS_OFFSET + (u_int64_t)m2;
+ s = SEC_TO_TAI64(m2);
/*
* Assume just _one_ leap second on each entry, and compensate
* the lacking error checking by validating the first entry