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:

committed by
Junio C Hamano

parent
e46579643d
commit
8109984d61
2
dir.c
2
dir.c
@ -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);
|
||||
|
Reference in New Issue
Block a user