summaryrefslogtreecommitdiff
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2014-09-07 09:06:42 +0200
committerJunio C Hamano <gitster@pobox.com>2014-09-08 11:26:48 -0700
commit415792edf51b2f87a58a942016a24a2e86a4218b (patch)
treef842e55189d3d0d8991544dd4e20aa55aa3b680d /merge-recursive.c
parentd07235a027e0c7ed2fee1aeb3bee8a858bf5ca58 (diff)
downloadgit-415792edf51b2f87a58a942016a24a2e86a4218b.tar.gz
strbuf: use strbuf_addchars() for adding a char multiple timesrs/export-strbuf-addchars
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index dbb7104c04..ec0fef8d7d 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -163,9 +163,7 @@ static void output(struct merge_options *o, int v, const char *fmt, ...)
if (!show(o, v))
return;
- strbuf_grow(&o->obuf, o->call_depth * 2 + 2);
- memset(o->obuf.buf + o->obuf.len, ' ', o->call_depth * 2);
- strbuf_setlen(&o->obuf, o->obuf.len + o->call_depth * 2);
+ strbuf_addchars(&o->obuf, ' ', o->call_depth * 2);
va_start(ap, fmt);
strbuf_vaddf(&o->obuf, fmt, ap);