From: Sebastian Buchwald Date: Fri, 28 May 2010 11:02:24 +0000 (+0000) Subject: Smash ugly big bug introduce in r24269 (reported by Thomas). X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;ds=sidebyside;h=3e12a408ea7d3a0672e8a16fd1f0dd78b17f571a;p=libfirm Smash ugly big bug introduce in r24269 (reported by Thomas). [r27598] --- diff --git a/optimal.c b/optimal.c index 8e7370f1a..ca796d609 100644 --- a/optimal.c +++ b/optimal.c @@ -976,7 +976,7 @@ unsigned get_local_minimal_alternative(pbqp *pbqp, pbqp_node *node) vector *vec; pbqp_matrix *mat; unsigned edge_index; - unsigned max_degree = 0; + unsigned max_degree; unsigned node_index; unsigned node_len; unsigned min_index = 0; @@ -985,8 +985,9 @@ unsigned get_local_minimal_alternative(pbqp *pbqp, pbqp_node *node) assert(pbqp); assert(node); - node_vec = node->costs; - node_len = node_vec->len; + node_vec = node->costs; + node_len = node_vec->len; + max_degree = pbqp_node_get_degree(node); for (node_index = 0; node_index < node_len; ++node_index) { num value = node_vec->entries[node_index].data;