From: Matthew Fernandez Date: Sun, 31 Jul 2022 16:30:26 +0000 (-0700) Subject: ccomps: remove 'N_NEW' that was only used in one place X-Git-Tag: 5.0.1~19^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d5cd6888174c1373ee1a0e26fe0656a78c143018;p=graphviz ccomps: remove 'N_NEW' that was only used in one place This brings us one step closer to having a single `N_NEW` macro in the tree and not having to constantly wonder which of the `N_NEW` definitions is in scope at any point where you see it called. --- diff --git a/cmd/tools/ccomps.c b/cmd/tools/ccomps.c index 1501df65a..b508afe15 100644 --- a/cmd/tools/ccomps.c +++ b/cmd/tools/ccomps.c @@ -29,8 +29,6 @@ #include #include -#define N_NEW(n,t) gv_calloc((n), sizeof(t)) - typedef struct { Agrec_t h; char cc_subg; /* true iff subgraph corresponds to a component */ @@ -497,7 +495,7 @@ static int cmp(Agraph_t** p0, Agraph_t** p1) static void printSorted (Agraph_t* root, int c_cnt) { - Agraph_t** ccs = N_NEW(c_cnt, Agraph_t*); + Agraph_t** ccs = gv_calloc(c_cnt, sizeof(Agraph_t*)); Agraph_t* subg; int i = 0, endi;