mirror of
https://github.com/nginx/nginx.git
synced 2025-06-12 21:52:41 +08:00
Fixed format specifiers in ngx_sprintf().
This commit is contained in:
parent
00ef9ff5f0
commit
6a716c6123
@ -348,7 +348,7 @@ ngx_inet6_ntop(u_char *p, u_char *text, size_t len)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = ngx_sprintf(dst, "%uxi", p[i] * 256 + p[i + 1]);
|
dst = ngx_sprintf(dst, "%uxd", p[i] * 256 + p[i + 1]);
|
||||||
|
|
||||||
if (i < 14) {
|
if (i < 14) {
|
||||||
*dst++ = ':';
|
*dst++ = ':';
|
||||||
|
@ -154,7 +154,7 @@ ngx_time_update(void)
|
|||||||
|
|
||||||
p2 = &cached_http_log_time[slot][0];
|
p2 = &cached_http_log_time[slot][0];
|
||||||
|
|
||||||
(void) ngx_sprintf(p2, "%02d/%s/%d:%02d:%02d:%02d %c%02d%02d",
|
(void) ngx_sprintf(p2, "%02d/%s/%d:%02d:%02d:%02d %c%02i%02i",
|
||||||
tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1],
|
tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1],
|
||||||
tm.ngx_tm_year, tm.ngx_tm_hour,
|
tm.ngx_tm_year, tm.ngx_tm_hour,
|
||||||
tm.ngx_tm_min, tm.ngx_tm_sec,
|
tm.ngx_tm_min, tm.ngx_tm_sec,
|
||||||
@ -163,7 +163,7 @@ ngx_time_update(void)
|
|||||||
|
|
||||||
p3 = &cached_http_log_iso8601[slot][0];
|
p3 = &cached_http_log_iso8601[slot][0];
|
||||||
|
|
||||||
(void) ngx_sprintf(p3, "%4d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
|
(void) ngx_sprintf(p3, "%4d-%02d-%02dT%02d:%02d:%02d%c%02i:%02i",
|
||||||
tm.ngx_tm_year, tm.ngx_tm_mon,
|
tm.ngx_tm_year, tm.ngx_tm_mon,
|
||||||
tm.ngx_tm_mday, tm.ngx_tm_hour,
|
tm.ngx_tm_mday, tm.ngx_tm_hour,
|
||||||
tm.ngx_tm_min, tm.ngx_tm_sec,
|
tm.ngx_tm_min, tm.ngx_tm_sec,
|
||||||
|
Loading…
Reference in New Issue
Block a user