projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63e2e40
)
strftime: fix underlying format string in %z format
author
Daniel Sabogal
<dsabogalcc@gmail.com>
Mon, 11 Jun 2018 17:15:15 +0000
(13:15 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Tue, 26 Jun 2018 20:44:42 +0000
(16:44 -0400)
the expression (tm->__tm_gmtoff)/3600 has type long. use %+.2ld instead.
src/time/strftime.c
patch
|
blob
|
history
diff --git
a/src/time/strftime.c
b/src/time/strftime.c
index 708875eeae52fc69be10418cd9fbdaa0e3e33a00..0a2569706db4ba73fe16fc3cdbb12d51c4751b8d 100644
(file)
--- a/
src/time/strftime.c
+++ b/
src/time/strftime.c
@@
-181,7
+181,7
@@
const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm *
*l = 0;
return "";
}
- *l = snprintf(*s, sizeof *s, "%+.2d%.2d",
+ *l = snprintf(*s, sizeof *s, "%+.2
l
d%.2d",
(tm->__tm_gmtoff)/3600,
abs(tm->__tm_gmtoff%3600)/60);
return *s;