From 04f10d332f47aed7d93ff3ed5c2bb3a366e44693 Mon Sep 17 00:00:00 2001 From: Jeff Hostetler Date: Thu, 8 Aug 2019 07:19:01 -0700 Subject: trace2: remove dead code in maybe_add_string_va() Remove an unnecessary "if" block in maybe_add_string_va(). Commit "ad006fe419e trace2: NULL is not allowed for va_list" changed "if (fmt && *fmt && ap)" to just "if (fmt && *fmt)" because it isn't safe to treat 'ap' as a pointer. This made the "if" block following it unnecessary. Signed-off-by: Jeff Hostetler Signed-off-by: Junio C Hamano --- trace2/tr2_tgt_normal.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'trace2/tr2_tgt_normal.c') diff --git a/trace2/tr2_tgt_normal.c b/trace2/tr2_tgt_normal.c index 00b116d797..47a1882557 100644 --- a/trace2/tr2_tgt_normal.c +++ b/trace2/tr2_tgt_normal.c @@ -135,11 +135,6 @@ static void maybe_append_string_va(struct strbuf *buf, const char *fmt, va_end(copy_ap); return; } - - if (fmt && *fmt) { - strbuf_addstr(buf, fmt); - return; - } } static void fn_error_va_fl(const char *file, int line, const char *fmt, -- cgit v1.2.3