Merge branch 'rs/export-strbuf-addchars'

Code clean-up.

* rs/export-strbuf-addchars:
  strbuf: use strbuf_addchars() for adding a char multiple times
  strbuf: export strbuf_addchars()
This commit is contained in:
Junio C Hamano
2014-09-19 11:38:39 -07:00
7 changed files with 18 additions and 20 deletions

View File

@ -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);