This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 9/9] BZ #17732: Replace %ld with %jd and cast to intmax_t
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 19 Dec 2014 14:17:37 -0800
- Subject: [PATCH 9/9] BZ #17732: Replace %ld with %jd and cast to intmax_t
- Authentication-results: sourceware.org; auth=none
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
OK to install?
H.J.
---
ChangeLog | 1 +
timezone/tst-timezone.c | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b32f26f..2c5ec3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,7 @@
* sysdeps/pthread/tst-timer.c (main): Likewise.
* time/clocktest.c (main): Likewise.
* time/tst-posixtz.c (do_test): Likewise.
+ * timezone/tst-timezone.c (main): Likewise.
2014-12-19 H.J. Lu <hongjiu.lu@intel.com>
diff --git a/timezone/tst-timezone.c b/timezone/tst-timezone.c
index b5edfff..135a72f 100644
--- a/timezone/tst-timezone.c
+++ b/timezone/tst-timezone.c
@@ -126,8 +126,8 @@ main (int argc, char ** argv)
strcpy (envstring, "TZ=Europe/London");
putenv (envstring);
t = mktime (&tmBuf);
- snprintf (buf, sizeof (buf), "TZ=%s %ld %d %d %d %d %d %d %d %d %d",
- getenv ("TZ"), t,
+ snprintf (buf, sizeof (buf), "TZ=%s %jd %d %d %d %d %d %d %d %d %d",
+ getenv ("TZ"), (intmax_t) t,
tmBuf.tm_sec, tmBuf.tm_min, tmBuf.tm_hour,
tmBuf.tm_mday, tmBuf.tm_mon, tmBuf.tm_year,
tmBuf.tm_wday, tmBuf.tm_yday, tmBuf.tm_isdst);
@@ -149,8 +149,8 @@ main (int argc, char ** argv)
strcpy (envstring, "TZ=GMT");
/* No putenv call needed! */
t = mktime (&tmBuf);
- snprintf (buf, sizeof (buf), "TZ=%s %ld %d %d %d %d %d %d %d %d %d",
- getenv ("TZ"), t,
+ snprintf (buf, sizeof (buf), "TZ=%s %jd %d %d %d %d %d %d %d %d %d",
+ getenv ("TZ"), (intmax_t) t,
tmBuf.tm_sec, tmBuf.tm_min, tmBuf.tm_hour,
tmBuf.tm_mday, tmBuf.tm_mon, tmBuf.tm_year,
tmBuf.tm_wday, tmBuf.tm_yday, tmBuf.tm_isdst);
--
1.9.3