summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-09-30 04:19:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-09-30 04:19:24 (GMT)
commita2e22bb3ade2564c6d55869086eac5cc6753b925 (patch)
tree6c82ef8a14e240cd623161fe940d5f2bd37b6888
parent1c6fc941c7bc1a94eee9d14725c324dccd010776 (diff)
parent1fd881d4046fb42f77ff9031ef07b7a18028ece0 (diff)
downloadgit-a2e22bb3ade2564c6d55869086eac5cc6753b925.zip
git-a2e22bb3ade2564c6d55869086eac5cc6753b925.tar.gz
git-a2e22bb3ade2564c6d55869086eac5cc6753b925.tar.bz2
Merge branch 'rs/trace2-dst-warning'
Code cleanup. * rs/trace2-dst-warning: trace2: use warning() directly in tr2_dst_malformed_warning()
-rw-r--r--trace2/tr2_dst.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/trace2/tr2_dst.c b/trace2/tr2_dst.c
index 5dda0ca..c698575 100644
--- a/trace2/tr2_dst.c
+++ b/trace2/tr2_dst.c
@@ -215,13 +215,8 @@ connected:
static void tr2_dst_malformed_warning(struct tr2_dst *dst,
const char *tgt_value)
{
- struct strbuf buf = STRBUF_INIT;
-
- 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);
+ warning("trace2: unknown value for '%s': '%s'",
+ tr2_sysenv_display_name(dst->sysenv_var), tgt_value);
}
int tr2_dst_get_trace_fd(struct tr2_dst *dst)