summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-05-12 20:50:46 +0000
committermiod <miod@openbsd.org>2014-05-12 20:50:46 +0000
commitb631dad79df01062a762f2b324c9e691c6098b84 (patch)
tree62001031b5f1e251564c341e9657761510edebf3
parentMove GTT management for Sandy Bridge and up into inteldrm(4). This makes (diff)
downloadwireguard-openbsd-b631dad79df01062a762f2b324c9e691c6098b84.tar.xz
wireguard-openbsd-b631dad79df01062a762f2b324c9e691c6098b84.zip
Fix format strings involving time_t arguments, fixes `ntpd -d' on sparc (and
probably more 32-bit platforms). Problem noticed by tobiasu@; ok tobiasu@ dtucker@ sthen@ benno@
-rw-r--r--usr.sbin/ntpd/client.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/ntpd/client.c b/usr.sbin/ntpd/client.c
index 6d1fc43421c..65eae36dd3a 100644
--- a/usr.sbin/ntpd/client.c
+++ b/usr.sbin/ntpd/client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: client.c,v 1.92 2013/10/21 08:48:22 phessler Exp $ */
+/* $OpenBSD: client.c,v 1.93 2014/05/12 20:50:46 miod Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -289,9 +289,9 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
}
interval = error_interval();
set_next(p, interval);
- log_info("reply from %s: not synced (%s), next query %ds",
+ log_info("reply from %s: not synced (%s), next query %llds",
log_sockaddr((struct sockaddr *)&p->addr->ss), s,
- interval);
+ (long long)interval);
return (0);
}
@@ -331,9 +331,9 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
interval = error_interval();
set_next(p, interval);
log_info("reply from %s: negative delay %fs, "
- "next query %ds",
+ "next query %llds",
log_sockaddr((struct sockaddr *)&p->addr->ss),
- p->reply[p->shift].delay, interval);
+ p->reply[p->shift].delay, (long long)interval);
return (0);
}
p->reply[p->shift].error = (T2 - T1) - (T3 - T4);
@@ -384,10 +384,10 @@ client_dispatch(struct ntp_peer *p, u_int8_t settime)
}
log_debug("reply from %s: offset %f delay %f, "
- "next query %ds %s",
+ "next query %llds %s",
log_sockaddr((struct sockaddr *)&p->addr->ss),
- p->reply[p->shift].offset, p->reply[p->shift].delay, interval,
- print_rtable(p->rtable));
+ p->reply[p->shift].offset, p->reply[p->shift].delay,
+ (long long)interval, print_rtable(p->rtable));
client_update(p);
if (settime)