diff options
| author | René Scharfe <l.s.r@web.de> | 2016-09-15 20:31:00 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-09-15 12:23:38 -0700 |
| commit | a22ae753cb297cb8a1e3ae950ae4415190cd51d5 (patch) | |
| tree | fca5ed773d854629968db249065e162d9ad61682 /builtin/fmt-merge-msg.c | |
| parent | add coccicheck make target (diff) | |
| download | git-a22ae753cb297cb8a1e3ae950ae4415190cd51d5.tar.gz git-a22ae753cb297cb8a1e3ae950ae4415190cd51d5.zip | |
use strbuf_addstr() for adding constant strings to a strbuf, part 2
Replace uses of strbuf_addf() for adding strings with more lightweight
strbuf_addstr() calls. This makes the intent clearer and avoids
potential issues with printf format specifiers.
02962d36845b89145cd69f8bc65e015d78ae3434 already converted six cases,
this patch covers eleven more.
A semantic patch for Coccinelle is included for easier checking for
new cases that might be introduced in the future.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fmt-merge-msg.c')
| -rw-r--r-- | builtin/fmt-merge-msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fmt-merge-msg.c b/builtin/fmt-merge-msg.c index ac84e99f3a..dc2e9e420d 100644 --- a/builtin/fmt-merge-msg.c +++ b/builtin/fmt-merge-msg.c @@ -395,7 +395,7 @@ static void shortlog(const char *name, for (i = 0; i < subjects.nr; i++) if (i >= limit) - strbuf_addf(out, " ...\n"); + strbuf_addstr(out, " ...\n"); else strbuf_addf(out, " %s\n", subjects.items[i].string); |
