From: Matthew Fernandez Date: Thu, 1 Dec 2022 04:46:33 +0000 (-0800) Subject: fdpgen: inline 'initCList' into a C99 initialization X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4756ba2dd179d5711d3752963a6cb1ec8d81b1b;p=graphviz fdpgen: inline 'initCList' into a C99 initialization This is the equivalent of 4460351650475f4e8aa4ef085928e1697776f070 but applied to fdpgen. --- diff --git a/lib/fdpgen/layout.c b/lib/fdpgen/layout.c index 086cffed3..662ed314e 100644 --- a/lib/fdpgen/layout.c +++ b/lib/fdpgen/layout.c @@ -281,13 +281,6 @@ typedef struct { int cnt; } clist_t; -static void initCList(clist_t * clist) -{ - clist->cl = 0; - clist->sz = 0; - clist->cnt = 0; -} - /* addCluster: * Append a new cluster to the list. * NOTE: cl[0] is empty. The clusters are in cl[1..cnt]. @@ -997,12 +990,11 @@ static void mkClusters (graph_t * g, clist_t* pclist, graph_t* parent) { graph_t* subg; - clist_t list; + clist_t list = {0}; clist_t* clist; if (pclist == NULL) { clist = &list; - initCList(clist); } else clist = pclist;