Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/dist/ntp/util remove bogus cast that hides bugs if tv_sec is...



details:   https://anonhg.NetBSD.org/src/rev/43fd3761844b
branches:  trunk
changeset: 753578:43fd3761844b
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Apr 02 15:38:05 2010 +0000

description:
remove bogus cast that hides bugs if tv_sec is non POSIX compliant.

diffstat:

 dist/ntp/util/ntptime.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r c0f079da586f -r 43fd3761844b dist/ntp/util/ntptime.c
--- a/dist/ntp/util/ntptime.c   Fri Apr 02 15:34:16 2010 +0000
+++ b/dist/ntp/util/ntptime.c   Fri Apr 02 15:38:05 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ntptime.c,v 1.4 2006/03/18 08:09:03 kardel Exp $       */
+/*     $NetBSD: ntptime.c,v 1.5 2010/04/02 15:38:05 christos Exp $     */
 
 /*
  * NTP test program
@@ -301,7 +301,7 @@
                    printf("  ntptime=%x.%x unixtime=%x.%0*d %s",
                    (unsigned int) ts.l_ui, (unsigned int) ts.l_uf,
                    (int) ntv.time.tv_sec, fdigits, (int) time_frac,
-                   ctime((const time_t *) &ntv.time.tv_sec));
+                   ctime(&ntv.time.tv_sec));
 #if NTP_API > 3
                printf(", TAI offset %ld\n", (long)ntv.tai);
 #else



Home | Main Index | Thread Index | Old Index