summaryrefslogtreecommitdiff
path: root/trace2
diff options
context:
space:
mode:
Diffstat (limited to 'trace2')
-rw-r--r--trace2/tr2_tgt_event.c2
-rw-r--r--trace2/tr2_tgt_normal.c2
-rw-r--r--trace2/tr2_tgt_perf.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/trace2/tr2_tgt_event.c b/trace2/tr2_tgt_event.c
index 107cb5317d..1cf4f62441 100644
--- a/trace2/tr2_tgt_event.c
+++ b/trace2/tr2_tgt_event.c
@@ -190,7 +190,7 @@ static void fn_atexit(uint64_t us_elapsed_absolute, int code)
static void maybe_add_string_va(struct json_writer *jw, const char *field_name,
const char *fmt, va_list ap)
{
- if (fmt && *fmt && ap) {
+ if (fmt && *fmt) {
va_list copy_ap;
struct strbuf buf = STRBUF_INIT;
diff --git a/trace2/tr2_tgt_normal.c b/trace2/tr2_tgt_normal.c
index 547183d5b6..1a07d70abd 100644
--- a/trace2/tr2_tgt_normal.c
+++ b/trace2/tr2_tgt_normal.c
@@ -126,7 +126,7 @@ static void fn_atexit(uint64_t us_elapsed_absolute, int code)
static void maybe_append_string_va(struct strbuf *buf, const char *fmt,
va_list ap)
{
- if (fmt && *fmt && ap) {
+ if (fmt && *fmt) {
va_list copy_ap;
va_copy(copy_ap, ap);
diff --git a/trace2/tr2_tgt_perf.c b/trace2/tr2_tgt_perf.c
index f0746fcf86..2a866d701b 100644
--- a/trace2/tr2_tgt_perf.c
+++ b/trace2/tr2_tgt_perf.c
@@ -211,7 +211,7 @@ static void fn_atexit(uint64_t us_elapsed_absolute, int code)
static void maybe_append_string_va(struct strbuf *buf, const char *fmt,
va_list ap)
{
- if (fmt && *fmt && ap) {
+ if (fmt && *fmt) {
va_list copy_ap;
va_copy(copy_ap, ap);