]> granicus.if.org Git - graphviz/commitdiff
setbounds: use C99 bools for locals 'onleft', 'onright'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 11 Jan 2022 04:56:57 +0000 (20:56 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 12 Jan 2022 01:19:33 +0000 (17:19 -0800)
lib/dotgen/flat.c

index fc62495e3b9e3b49362149af39738063c0230632..0f8588a525d1d50a21d6c29d920ebb6a75e9dc34 100644 (file)
@@ -10,7 +10,7 @@
 
 
 #include       <dotgen/dot.h>
-
+#include       <stdbool.h>
 
 static node_t *make_vn_slot(graph_t * g, int r, int pos)
 {
@@ -75,21 +75,21 @@ static void setbounds(node_t * v, int *bounds, int lpos, int rpos)
                    bounds[SRB] = ord;
            }
        } else {                /* forward */
-           boolean onleft, onright;
-           onleft = onright = FALSE;
+           bool onleft, onright;
+           onleft = onright = false;
            for (i = 0; (f = ND_out(v).list[i]); i++) {
                if (ND_order(aghead(f)) <= lpos) {
-                   onleft = TRUE;
+                   onleft = true;
                    continue;
                }
                if (ND_order(aghead(f)) >= rpos) {
-                   onright = TRUE;
+                   onright = true;
                    continue;
                }
            }
-           if (onleft && (onright == FALSE))
+           if (onleft && !onright)
                bounds[HLB] = ord + 1;
-           if (onright && (onleft == FALSE))
+           if (onright && !onleft)
                bounds[HRB] = ord - 1;
        }
     }