use strbuf_addstr() for adding strings to strbufs
Use strbuf_addstr() instead of strbuf_addf() for adding strings. That's simpler and makes the intent clearer. Patch generated by Coccinelle and contrib/coccinelle/strbuf.cocci; adjusted indentation in refs/packed-backend.c manually. 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
fa2bb34477
commit
72d4a9a721
@ -729,8 +729,8 @@ static int write_with_updates(struct packed_ref_store *refs,
|
||||
}
|
||||
|
||||
if (ok != ITER_DONE) {
|
||||
strbuf_addf(err, "unable to write packed-refs file: "
|
||||
"error iterating over old contents");
|
||||
strbuf_addstr(err, "unable to write packed-refs file: "
|
||||
"error iterating over old contents");
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user