]> granicus.if.org Git - graphviz/commitdiff
anticipate return codes from feasible_tree other than 0 and 1
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 14 Nov 2020 19:36:10 +0000 (11:36 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 23 Jan 2021 04:39:06 +0000 (20:39 -0800)
Related to #1801.

lib/common/ns.c

index 65c7a55fdc96403dc164ea52d728e84e2386f050..e1b0e285925283f225d6fa7a0845b2d6b1a7fe0c 100644 (file)
@@ -852,9 +852,12 @@ int rank2(graph_t * g, int balance, int maxiter, int search_size)
        return 2;
     }
 
-    if (feasible_tree()) {
-       freeTreeList (g);
-       return 1;
+    {
+       int err = feasible_tree();
+       if (err != 0) {
+           freeTreeList (g);
+           return err;
+       }
     }
     while ((e = leave_edge())) {
        f = enter_edge(e);