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:
@ -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);
|
||||
|
Reference in New Issue
Block a user