diff options
author | 2013-04-17 15:55:44 +0000 | |
---|---|---|
committer | 2013-04-17 15:55:44 +0000 | |
commit | 5cab1010d3354930151e150afcd9f267c35da5a9 (patch) | |
tree | e3102f835dd9259cb9d24d308c1f36b2084ac407 | |
parent | evtag_marshal_timeval() truncates tv_sec to 32 bits, not passing the high (diff) | |
download | wireguard-openbsd-5cab1010d3354930151e150afcd9f267c35da5a9.tar.xz wireguard-openbsd-5cab1010d3354930151e150afcd9f267c35da5a9.zip |
first few large time_t changes; more might be required -- still digging.
-rw-r--r-- | usr.sbin/amd/amd/nfs_start.c | 4 | ||||
-rw-r--r-- | usr.sbin/amd/amq/amq.c | 10 | ||||
-rw-r--r-- | usr.sbin/amd/fsinfo/fsi_util.c | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/usr.sbin/amd/amd/nfs_start.c b/usr.sbin/amd/amd/nfs_start.c index 742ab279e49..0453928b089 100644 --- a/usr.sbin/amd/amd/nfs_start.c +++ b/usr.sbin/amd/amd/nfs_start.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)nfs_start.c 8.1 (Berkeley) 6/6/93 - * $Id: nfs_start.c,v 1.15 2004/10/21 20:57:08 millert Exp $ + * $Id: nfs_start.c,v 1.16 2013/04/17 15:55:44 deraadt Exp $ */ #include "am.h" @@ -264,7 +264,7 @@ run_rpc(void) #ifdef DEBUG if (tvv.tv_sec) - dlog("Select waits for %ds", tvv.tv_sec); + dlog("Select waits for %llds", (long long)tvv.tv_sec); else dlog("Select waits for Godot"); #endif /* DEBUG */ diff --git a/usr.sbin/amd/amq/amq.c b/usr.sbin/amd/amq/amq.c index 706be15435f..a5db412bd01 100644 --- a/usr.sbin/amd/amq/amq.c +++ b/usr.sbin/amd/amq/amq.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)amq.c 8.1 (Berkeley) 6/7/93 - * $Id: amq.c,v 1.13 2009/10/27 23:59:50 deraadt Exp $ + * $Id: amq.c,v 1.14 2013/04/17 15:55:46 deraadt Exp $ */ /* @@ -92,7 +92,9 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, } case Full: { - struct tm *tp = localtime((time_t *) &mt->mt_mounttime); + time_t t = *mt->mt_mounttime; + + struct tm *tp = localtime(&t); printf("%-*.*s %-*.*s %-*.*s %s\n\t%-5d %-7d %-6d" " %-7d %-7d %-6d %02d/%02d/%02d %02d:%02d:%02d\n", @@ -108,7 +110,9 @@ show_mti(amq_mount_tree *mt, enum show_opt e, int *mwid, int *dwid, } case Stats: { - struct tm *tp = localtime((time_t *) &mt->mt_mounttime); + time_t t = *mt->mt_mounttime; + + struct tm *tp = localtime(&t); printf("%-*.*s %-5d %-7d %-6d %-7d %-7d %-6d" " %02d/%02d/%02d %02d:%02d:%02d\n", diff --git a/usr.sbin/amd/fsinfo/fsi_util.c b/usr.sbin/amd/fsinfo/fsi_util.c index 443ccf4d3e2..7a9c45fefb8 100644 --- a/usr.sbin/amd/fsinfo/fsi_util.c +++ b/usr.sbin/amd/fsinfo/fsi_util.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * from: @(#)fsi_util.c 8.1 (Berkeley) 6/6/93 - * $Id: fsi_util.c,v 1.7 2003/06/02 23:36:52 millert Exp $ + * $Id: fsi_util.c,v 1.8 2013/04/17 15:55:46 deraadt Exp $ */ #include "../fsinfo/fsinfo.h" @@ -127,7 +127,7 @@ char *hn; static void make_banner(fp) FILE *fp; { - time_t t = time((time_t*) 0); + time_t t = time(NULL); char *ctime(), *cp = ctime(&t); fprintf(fp, |