From bc57b9c0cc5a123365a922fa1831177e3fd607ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Fri, 5 Aug 2016 22:37:11 +0200 Subject: use strbuf_addstr() instead of strbuf_addf() with "%s" Call strbuf_addstr() for adding a simple string to a strbuf instead of using the heavier strbuf_addf(). This is shorter and documents the intent more clearly. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'http.c') diff --git a/http.c b/http.c index df6dd01594..d8e427b69b 100644 --- a/http.c +++ b/http.c @@ -1105,7 +1105,7 @@ void append_remote_object_url(struct strbuf *buf, const char *url, strbuf_addf(buf, "objects/%.*s/", 2, hex); if (!only_two_digit_prefix) - strbuf_addf(buf, "%s", hex+2); + strbuf_addstr(buf, hex + 2); } char *get_remote_object_url(const char *url, const char *hex, -- cgit v1.2.1