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

index 5735ee9a8fd12f2ca70e7f96b259d810d23036db..150ea824cb9fddf5f4c3d479174a78b49365c299 100644 (file)
@@ -282,7 +282,7 @@ static int write_dicts(Agraph_t * g, iochan_t * ofile, int top)
 static int write_hdr(Agraph_t * g, iochan_t * ofile, int top)
 {
     char *name, *sep, *kind, *strict;
-    int root = 0;
+    bool root = false;
     bool hasName = true;
 
     Attrs_not_written_flag = AGATTRWF(g);
@@ -290,7 +290,7 @@ static int write_hdr(Agraph_t * g, iochan_t * ofile, int top)
     if (NOT(top) && agparent(g))
        kind = "sub";
     else {
-       root = 1;
+       root = true;
        if (g->desc.directed)
            kind = "di";
        else