Source-Changes-HG archive

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

[src/trunk]: src/tests/syscall Don't print a time_t with %lu



details:   https://anonhg.NetBSD.org/src/rev/0313c035693b
branches:  trunk
changeset: 764738:0313c035693b
user:      gson <gson%NetBSD.org@localhost>
date:      Mon May 02 11:14:29 2011 +0000

description:
Don't print a time_t with %lu

diffstat:

 tests/syscall/t_nanosleep.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (37 lines):

diff -r 7cc7ad26fbe1 -r 0313c035693b tests/syscall/t_nanosleep.c
--- a/tests/syscall/t_nanosleep.c       Mon May 02 09:03:10 2011 +0000
+++ b/tests/syscall/t_nanosleep.c       Mon May 02 11:14:29 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_nanosleep.c,v 1.5 2011/05/02 07:02:09 jruoho Exp $ */
+/* $NetBSD: t_nanosleep.c,v 1.6 2011/05/02 11:14:29 gson Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_nanosleep.c,v 1.5 2011/05/02 07:02:09 jruoho Exp $");
+__RCSID("$NetBSD: t_nanosleep.c,v 1.6 2011/05/02 11:14:29 gson Exp $");
 
 #include <sys/time.h>
 #include <sys/wait.h>
@@ -80,12 +80,12 @@
                if (timespeccmp(&ts2, &ts1, <=) != 0) {
 
                        (void)fprintf(stderr,
-                           "sleep time:: sec %lu, nsec %lu\n\t\t"
-                           "ts1: sec %lu, nsec %lu\n\t\t"
-                           "ts2: sec %lu, nsec %lu\n",
-                           tsn.tv_sec, tsn.tv_nsec,
-                           ts1.tv_sec, ts1.tv_nsec,
-                           ts2.tv_sec, ts2.tv_nsec);
+                           "sleep time:: sec %llu, nsec %lu\n\t\t"
+                           "ts1: sec %llu, nsec %lu\n\t\t"
+                           "ts2: sec %llu, nsec %lu\n",
+                           (unsigned long long)tsn.tv_sec, tsn.tv_nsec,
+                           (unsigned long long)ts1.tv_sec, ts1.tv_nsec,
+                           (unsigned long long)ts2.tv_sec, ts2.tv_nsec);
 
                        atf_tc_fail_nonfatal("inaccuracies in sleep time "
                            "(resolution = %lu nsec)", tsn.tv_nsec);



Home | Main Index | Thread Index | Old Index