summaryrefslogtreecommitdiff
path: root/graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'graph.c')
-rw-r--r--graph.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/graph.c b/graph.c
index 288b9a6..23fff73 100644
--- a/graph.c
+++ b/graph.c
@@ -1139,7 +1139,7 @@ int graph_next_line(struct git_graph *graph, struct strbuf *sb)
static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
{
- int i, j;
+ int i;
if (graph->state != GRAPH_COMMIT) {
graph_next_line(graph, sb);
@@ -1163,8 +1163,7 @@ static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
strbuf_addch(sb, ' ');
else {
int num_spaces = ((graph->num_parents - 2) * 2);
- for (j = 0; j < num_spaces; j++)
- strbuf_addch(sb, ' ');
+ strbuf_addchars(sb, ' ', num_spaces);
}
} else {
strbuf_write_column(sb, col, '|');