]> granicus.if.org Git - graphviz/commitdiff
use a stronger return type in has_no_predecessor_below
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 20 Mar 2021 18:56:21 +0000 (11:56 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 29 Mar 2021 03:10:45 +0000 (20:10 -0700)
lib/cgraph/write.c

index d7c64fa4e8c3157db3c31227103004e1d2b09f05..d97ff1326a0b2211e392f5922fc8f110e538e9a3 100644 (file)
@@ -378,17 +378,17 @@ static bool has_no_edges(Agraph_t * g, Agnode_t * n)
     return agfstin(g, n) == NULL && agfstout(g, n) == NULL;
 }
 
-static int has_no_predecessor_below(Agraph_t * g, Agnode_t * n,
+static bool has_no_predecessor_below(Agraph_t * g, Agnode_t * n,
                                    uint64_t val)
 {
     Agedge_t *e;
 
     if (AGSEQ(n) < val)
-       return FALSE;
+       return false;
     for (e = agfstin(g, n); e; e = agnxtin(g, e))
        if (AGSEQ(e->node) < val)
-           return FALSE;
-    return TRUE;
+           return false;
+    return true;
 }
 
 static int not_default_attrs(Agraph_t * g, Agnode_t * n)