From 4460351650475f4e8aa4ef085928e1697776f070 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 30 Nov 2022 20:46:33 -0800 Subject: [PATCH] patchwork: inline 'initCList' into a C99 initialization --- lib/patchwork/patchworkinit.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/patchwork/patchworkinit.c b/lib/patchwork/patchworkinit.c index 7b5ebe2c8..5385e193f 100644 --- a/lib/patchwork/patchworkinit.c +++ b/lib/patchwork/patchworkinit.c @@ -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; -- 2.40.0