From: Jonas Fonseca Date: Wed, 13 Sep 2006 23:28:56 +0000 (+0200) Subject: append_to_rev_graph: use local variable X-Git-Tag: tig-0.6~10 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/tig/commitdiff_plain/2c27faac1c8fcd27a863cafdfb0543d1251f8176?hp=--cc append_to_rev_graph: use local variable --- 2c27faac1c8fcd27a863cafdfb0543d1251f8176 diff --git a/tig.c b/tig.c index 5a65d24..cc39d7e 100644 --- a/tig.c +++ b/tig.c @@ -2708,8 +2708,10 @@ graph_parent_is_merge(struct rev_graph *graph) static inline void append_to_rev_graph(struct rev_graph *graph, chtype symbol) { - if (graph->commit->graph_size < ARRAY_SIZE(graph->commit->graph) - 1) - graph->commit->graph[graph->commit->graph_size++] = symbol; + struct commit *commit = graph->commit; + + if (commit->graph_size < ARRAY_SIZE(commit->graph) - 1) + commit->graph[commit->graph_size++] = symbol; } static void