summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1998-06-23 12:25:01 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1998-06-23 12:25:01 +0000
commit3553b6c0ebbec5ef9e65e7e091ecaaa94814fa8e (patch)
tree15ce25fc362e181671f52c68f03bf677a805105c
parente8d15c7a4e25d26e08cfa8786df09498bb1d3c26 (diff)
real fix
-rw-r--r--kerberosIV/krb/time.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/kerberosIV/krb/time.c b/kerberosIV/krb/time.c
index 3c73802e9c5..4cfc9aeaff4 100644
--- a/kerberosIV/krb/time.c
+++ b/kerberosIV/krb/time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: time.c,v 1.2 1998/06/23 11:49:36 art Exp $ */
+/* $OpenBSD: time.c,v 1.3 1998/06/23 12:25:00 art Exp $ */
/* $KTH: time.c,v 1.1 1998/02/19 19:12:55 joda Exp $ */
/*
* Copyright (c) 1998 Kungliga Tekniska Högskolan
@@ -62,10 +62,15 @@ krb_get_kdc_time_diff(void)
void
krb_kdctimeofday(struct timeval *tv)
{
+ time_t t;
+
gettimeofday(tv, NULL);
+ t = (time_t)tv->tv_sec;
+
if(krb_debug)
- krb_warning("Machine time: %s", ctime((time_t *)&tv->tv_sec));
+ krb_warning("Machine time: %s", ctime(&t));
tv->tv_sec += krb_get_kdc_time_diff();
+ t = (time_t)tv->tv_sec;
if(krb_debug)
- krb_warning("Correcting to %s", ctime((time_t *)&tv->tv_sec));
+ krb_warning("Correcting to %s", ctime(&t));
}