diff options
author | René Scharfe <l.s.r@web.de> | 2014-09-07 09:06:42 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-08 11:26:48 -0700 |
commit | 415792edf51b2f87a58a942016a24a2e86a4218b (patch) | |
tree | f842e55189d3d0d8991544dd4e20aa55aa3b680d /graph.c | |
parent | d07235a027e0c7ed2fee1aeb3bee8a858bf5ca58 (diff) | |
download | git-415792edf51b2f87a58a942016a24a2e86a4218b.tar.gz |
strbuf: use strbuf_addchars() for adding a char multiple timesrs/export-strbuf-addchars
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'graph.c')
-rw-r--r-- | graph.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1145,7 +1145,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); @@ -1169,8 +1169,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, '|'); |