run-command: use strbuf_addstr() for adding a string to a strbuf
authorRené Scharfe <l.s.r@web.de>
Sun, 25 Mar 2018 10:57:50 +0000 (12:57 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 25 Mar 2018 16:49:15 +0000 (09:49 -0700)
Patch generated with Coccinelle and contrib/coccinelle/strbuf.cocci.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.c

index a483d59..84899e4 100644 (file)
@@ -621,7 +621,7 @@ static void trace_run_command(const struct child_process *cp)
        if (!trace_want(&trace_default_key))
                return;
 
-       strbuf_addf(&buf, "trace: run_command:");
+       strbuf_addstr(&buf, "trace: run_command:");
        if (cp->dir) {
                strbuf_addstr(&buf, " cd ");
                sq_quote_buf_pretty(&buf, cp->dir);