use strbuf_addstr() instead of strbuf_addf() with "%s"
[gitweb.git] / http.c
diff --git a/http.c b/http.c
index df6dd01594a0c7bacbb9beacec683072de38a5b1..d8e427b69b43a8cc0607893e59891fc8a4356f51 100644 (file)
--- 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,