mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: skip get_gmtime where tm is unused
For LOG_FMT_TS (%Ts), the tm variable is not used, so save some cycles on the call to get_gmtime. Backport: 1.9 1.8 Signed-off-by: Robin H. Johnson <rjohnson@digitalocean.com>
This commit is contained in:
parent
0f93672dfe
commit
543d4507ca
@ -2019,7 +2019,6 @@ int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LOG_FMT_TS: // %Ts
|
case LOG_FMT_TS: // %Ts
|
||||||
get_gmtime(logs->accept_date.tv_sec, &tm);
|
|
||||||
if (tmp->options & LOG_OPT_HEXA) {
|
if (tmp->options & LOG_OPT_HEXA) {
|
||||||
iret = snprintf(tmplog, dst + maxsize - tmplog, "%04X", (unsigned int)logs->accept_date.tv_sec);
|
iret = snprintf(tmplog, dst + maxsize - tmplog, "%04X", (unsigned int)logs->accept_date.tv_sec);
|
||||||
if (iret < 0 || iret > dst + maxsize - tmplog)
|
if (iret < 0 || iret > dst + maxsize - tmplog)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user