summaryrefslogtreecommitdiff
path: root/json-writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-writer.c')
-rw-r--r--json-writer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/json-writer.c b/json-writer.c
index 005c820aa4..25b9201f9c 100644
--- a/json-writer.c
+++ b/json-writer.c
@@ -46,10 +46,7 @@ static void append_quoted_string(struct strbuf *out, const char *in)
static void indent_pretty(struct json_writer *jw)
{
- int k;
-
- for (k = 0; k < jw->open_stack.len; k++)
- strbuf_addstr(&jw->json, " ");
+ strbuf_addstrings(&jw->json, " ", jw->open_stack.len);
}
/*