From 22f887d86ed9d83dc7f2b1017259431ead1e1f6c Mon Sep 17 00:00:00 2001 From: Steve Hill Date: Wed, 14 May 2014 09:36:48 -0600 Subject: [PATCH] Regression: segfault logging with %tg format specifier In rev.13132 Token class data member was converted from union to struct without adding initializer for the timespec field. timespec is a redundant field anyway, just remove it. --- src/format/Format.cc | 2 +- src/format/Token.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/format/Format.cc b/src/format/Format.cc index 10d1f67625..10782850f2 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -475,7 +475,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS const char *spec; struct tm *t; - spec = fmt->data.timespec; + spec = fmt->data.string; if (fmt->type == LFT_TIME_LOCALTIME) { if (!spec) diff --git a/src/format/Token.h b/src/format/Token.h index a50c38a722..16e21787b5 100644 --- a/src/format/Token.h +++ b/src/format/Token.h @@ -49,7 +49,6 @@ public: char *element; char separator; } header; - char *timespec; } data; int widthMin; ///< minimum field width int widthMax; ///< maximum field width -- 2.47.2