Merge branch 'rs/trace2-dst-warning'

Code cleanup.

* rs/trace2-dst-warning:
  trace2: use warning() directly in tr2_dst_malformed_warning()
This commit is contained in:
Junio C Hamano 2019-09-30 13:19:24 +09:00
commit a2e22bb3ad

View File

@ -215,13 +215,8 @@ connected:
static void tr2_dst_malformed_warning(struct tr2_dst *dst, static void tr2_dst_malformed_warning(struct tr2_dst *dst,
const char *tgt_value) const char *tgt_value)
{ {
struct strbuf buf = STRBUF_INIT; warning("trace2: unknown value for '%s': '%s'",
tr2_sysenv_display_name(dst->sysenv_var), tgt_value);
strbuf_addf(&buf, "trace2: unknown value for '%s': '%s'",
tr2_sysenv_display_name(dst->sysenv_var), tgt_value);
warning("%s", buf.buf);
strbuf_release(&buf);
} }
int tr2_dst_get_trace_fd(struct tr2_dst *dst) int tr2_dst_get_trace_fd(struct tr2_dst *dst)