use strbuf_addbuf() for appending a strbuf to another

Use strbuf_addbuf() where possible; it's shorter and more efficient.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe
2016-07-19 20:36:29 +02:00
committed by Junio C Hamano
parent e46579643d
commit 8109984d61
3 changed files with 3 additions and 3 deletions

2
dir.c
View File

@ -2346,7 +2346,7 @@ void write_untracked_extension(struct strbuf *out, struct untracked_cache *untra
varint_len = encode_varint(untracked->ident.len, varbuf);
strbuf_add(out, varbuf, varint_len);
strbuf_add(out, untracked->ident.buf, untracked->ident.len);
strbuf_addbuf(out, &untracked->ident);
strbuf_add(out, ouc, ouc_size(len));
free(ouc);