|
|
- commit 5d9e3238ae9474051b2020a04af2cbb11b613f98
- Author: Robin H. Johnson <robbat2@gentoo.org>
- Date: Wed Apr 10 21:08:15 2019 +0000
-
- 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>
- (cherry picked from commit 543d4507ca4ddd9ece5eb4e869b20ee1d2afedac)
- Signed-off-by: Willy Tarreau <w@1wt.eu>
- (cherry picked from commit 0ab133673a28fb91679f2b8471ed13ce265aa8a6)
- Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
-
- diff --git a/src/log.c b/src/log.c
- index 9c112255..313fa55d 100644
- --- a/src/log.c
- +++ b/src/log.c
- @@ -1651,7 +1651,6 @@ int build_logline(struct stream *s, char *dst, size_t maxsize, struct list *list
- break;
-
- case LOG_FMT_TS: // %Ts
- - get_gmtime(s->logs.accept_date.tv_sec, &tm);
- if (tmp->options & LOG_OPT_HEXA) {
- iret = snprintf(tmplog, dst + maxsize - tmplog, "%04X", (unsigned int)s->logs.accept_date.tv_sec);
- if (iret < 0 || iret > dst + maxsize - tmplog)
|