diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/ipcpd/unicast/pol/graph.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 03608b04..130e3eb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,7 @@ test_and_set_c_compiler_flag_global(-Wvla) #test_and_set_c_compiler_flag_global(-Wswitch-default) test_and_set_c_compiler_flag_global(-Wunreachable-code) test_and_set_c_compiler_flag_global(-Wdeclaration-after-statement) +test_and_set_c_compiler_flag_global(-Winfinite-recursion) test_and_set_c_compiler_flag_global(-fmax-errors=5) if (CMAKE_BUILD_TYPE STREQUAL "Release") test_and_set_c_compiler_flag_global(-O3) diff --git a/src/ipcpd/unicast/pol/graph.c b/src/ipcpd/unicast/pol/graph.c index a3689ad6..ba2ce553 100644 --- a/src/ipcpd/unicast/pol/graph.c +++ b/src/ipcpd/unicast/pol/graph.c @@ -625,7 +625,7 @@ static int graph_routing_table_lfa(struct graph * graph, int j; int k; - if (graph_routing_table_lfa(graph, s_addr, table, dist)) + if (graph_routing_table_simple(graph, s_addr, table, dist)) goto fail_table; for (j = 0; j < PROG_MAX_FLOWS; j++) { @@ -677,7 +677,7 @@ static int graph_routing_table_lfa(struct graph * graph, continue; if (n_dist[j][v->index] < - *dist[n_index[j]] + *dist[v->index]) + (*dist)[n_index[j]] + (*dist)[v->index]) if (add_lfa_to_table(table, v->addr, addrs[j])) goto fail_add_lfa; |