From: Matthew Fernandez Date: Sat, 20 Mar 2021 18:52:25 +0000 (-0700) Subject: use a stronger type for root variable X-Git-Tag: 2.47.1~24^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1110651b6dbc084de1dc5de53c0e532e95096fa5;p=graphviz use a stronger type for root variable --- diff --git a/lib/cgraph/write.c b/lib/cgraph/write.c index 5735ee9a8..150ea824c 100644 --- a/lib/cgraph/write.c +++ b/lib/cgraph/write.c @@ -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