summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2013-04-19 05:06:21 +0000
committerderaadt <deraadt@openbsd.org>2013-04-19 05:06:21 +0000
commit5bfbc77e5792df1aaafd631782dfcb73a10608c1 (patch)
tree52f9f8fad0d5a3da3128119320dc11e12b5281aa
parentadd the ability to query supported ciphers, MACs, key type and KEX (diff)
downloadwireguard-openbsd-5bfbc77e5792df1aaafd631782dfcb73a10608c1.tar.xz
wireguard-openbsd-5bfbc77e5792df1aaafd631782dfcb73a10608c1.zip
print tv_sec properly
-rw-r--r--usr.sbin/rpc.lockd/test.c9
-rw-r--r--usr.sbin/rtadvd/rtadvd.c8
-rw-r--r--usr.sbin/rtsold/rtsold.c12
3 files changed, 14 insertions, 15 deletions
diff --git a/usr.sbin/rpc.lockd/test.c b/usr.sbin/rpc.lockd/test.c
index 11fb4febdb5..176291aba91 100644
--- a/usr.sbin/rpc.lockd/test.c
+++ b/usr.sbin/rpc.lockd/test.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test.c,v 1.5 2009/10/27 23:59:54 deraadt Exp $ */
+/* $OpenBSD: test.c,v 1.6 2013/04/19 05:06:21 deraadt Exp $ */
#include <rpc/rpc.h>
#include <rpcsvc/nlm_prot.h>
@@ -291,13 +291,14 @@ main(int argc, char **argv)
exit(1);
}
clnt_control(cli, CLGET_TIMEOUT, &tim);
- printf("Default timeout was %d.%d\n", tim.tv_sec, tim.tv_usec);
+ printf("Default timeout was %lld.%ld\n", (long long)tim.tv_sec,
+ tim.tv_usec);
tim.tv_usec = -1;
tim.tv_sec = -1;
clnt_control(cli, CLSET_TIMEOUT, &tim);
clnt_control(cli, CLGET_TIMEOUT, &tim);
- printf("timeout now %d.%d\n", tim.tv_sec, tim.tv_usec);
-
+ printf("timeout now %lld.%ld\n", (long long)tim.tv_sec,
+ tim.tv_usec);
arg.cookie.n_len = 4;
arg.cookie.n_bytes = "hello";
diff --git a/usr.sbin/rtadvd/rtadvd.c b/usr.sbin/rtadvd/rtadvd.c
index 2ca6ea94c25..a5dd636c348 100644
--- a/usr.sbin/rtadvd/rtadvd.c
+++ b/usr.sbin/rtadvd/rtadvd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtadvd.c,v 1.41 2013/04/17 00:14:37 deraadt Exp $ */
+/* $OpenBSD: rtadvd.c,v 1.42 2013/04/19 05:06:35 deraadt Exp $ */
/* $KAME: rtadvd.c,v 1.66 2002/05/29 14:18:36 itojun Exp $ */
/*
@@ -1454,8 +1454,6 @@ ra_timer_update(void *data, struct timeval *tm)
tm->tv_sec = interval;
tm->tv_usec = 0;
- log_debug("RA timer on %s is set to %ld:%ld", rai->ifname,
- (long int)tm->tv_sec, (long int)tm->tv_usec);
-
- return;
+ log_debug("RA timer on %s is set to %lld:%ld", rai->ifname,
+ (long long)tm->tv_sec, tm->tv_usec);
}
diff --git a/usr.sbin/rtsold/rtsold.c b/usr.sbin/rtsold/rtsold.c
index 6430eb7e141..c88f8c61f20 100644
--- a/usr.sbin/rtsold/rtsold.c
+++ b/usr.sbin/rtsold/rtsold.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsold.c,v 1.47 2011/03/23 00:59:49 bluhm Exp $ */
+/* $OpenBSD: rtsold.c,v 1.48 2013/04/19 05:06:52 deraadt Exp $ */
/* $KAME: rtsold.c,v 1.75 2004/01/03 00:00:07 itojun Exp $ */
/*
@@ -554,8 +554,8 @@ rtsol_check_timer(void)
timersub(&rtsol_timer, &now, &returnval);
if (dflag > 1)
- warnmsg(LOG_DEBUG, __func__, "New timer is %ld:%08ld",
- (long)returnval.tv_sec, (long)returnval.tv_usec);
+ warnmsg(LOG_DEBUG, __func__, "New timer is %lld:%08ld",
+ (long long)returnval.tv_sec, returnval.tv_usec);
return(&returnval);
}
@@ -624,9 +624,9 @@ rtsol_timer_update(struct ifinfo *ifinfo)
if (dflag > 1)
warnmsg(LOG_DEBUG, __func__,
- "set timer for %s to %d:%d", ifinfo->ifname,
- (int)ifinfo->timer.tv_sec,
- (int)ifinfo->timer.tv_usec);
+ "set timer for %s to %lld:%ld", ifinfo->ifname,
+ (long long)ifinfo->timer.tv_sec,
+ ifinfo->timer.tv_usec);
}
#undef MILLION