From: Matthew Fernandez Date: Sat, 29 May 2021 18:03:13 +0000 (-0700) Subject: use a C99 bool for ingraph’s heap flag X-Git-Tag: 2.47.3~16^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ab4006fdef926f09397b195a59ade091f93ae66;p=graphviz use a C99 bool for ingraph’s heap flag The semantics of this flag were already a boolean value, so we can use the type system to more obviously indicate this. --- diff --git a/lib/ingraphs/ingraphs.c b/lib/ingraphs/ingraphs.c index f10ae53e2..10b0ad15d 100644 --- a/lib/ingraphs/ingraphs.c +++ b/lib/ingraphs/ingraphs.c @@ -13,6 +13,7 @@ * Written by Emden Gansner */ +#include #include #include @@ -95,9 +96,9 @@ new_ing(ingraph_state * sp, char **files, Agraph_t** graphs, ingdisc * disc) fprintf(stderr, "ingraphs: out of memory\n"); return 0; } - sp->heap = 1; + sp->heap = true; } else - sp->heap = 0; + sp->heap = false; if (graphs) { sp->ingraphs = 1; sp->u.Graphs = graphs; diff --git a/lib/ingraphs/ingraphs.h b/lib/ingraphs/ingraphs.h index 22e48186a..4591db124 100644 --- a/lib/ingraphs/ingraphs.h +++ b/lib/ingraphs/ingraphs.h @@ -15,6 +15,7 @@ * of Agraph_t. */ +#include #include #ifdef __cplusplus @@ -39,7 +40,7 @@ extern "C" { int ingraphs; void *fp; ingdisc *fns; - char heap; + bool heap; unsigned errors; } ingraph_state;