]> granicus.if.org Git - graphviz/commitdiff
patchwork: inline 'initCList' into a C99 initialization
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 1 Dec 2022 04:46:33 +0000 (20:46 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 4 Dec 2022 18:02:35 +0000 (10:02 -0800)
lib/patchwork/patchworkinit.c

index 7b5ebe2c89a9310b162bd92402e7a38c830a8f4a..5385e193f1e379ef7807de183606bcf017d960e1 100644 (file)
@@ -25,13 +25,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].
@@ -59,12 +52,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;