From: Matthew Fernandez Date: Sat, 10 Sep 2022 03:09:06 +0000 (-0700) Subject: sfdpgen maximal_independent_vertex_set: use cgraph wrapper for allocation X-Git-Tag: 6.0.2~44^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=204cf31489484d8d0c040c193a331cfc4445b7bb;p=graphviz sfdpgen maximal_independent_vertex_set: use cgraph wrapper for allocation The lib/cgraph/alloc.h wrappers are similar to the older lib/common/memory.h wrappers except (1) they are header-only and (2) they live in a directory (cgraph) that is at the root of the dependency tree. The long term plan is to replace all use of lib/common/memory.h with lib/cgraph/alloc.h. --- diff --git a/lib/sfdpgen/Multilevel.c b/lib/sfdpgen/Multilevel.c index 6fe3cc943..7d603078d 100644 --- a/lib/sfdpgen/Multilevel.c +++ b/lib/sfdpgen/Multilevel.c @@ -80,7 +80,7 @@ static void maximal_independent_vertex_set(SparseMatrix A, int randomize, int ** m = A->m; n = A->n; assert(n == m); - *vset = N_GNEW(m,int); + *vset = gv_calloc(m, sizeof(int)); for (i = 0; i < m; i++) (*vset)[i] = MAX_IND_VTX_SET_U; *nvset = 0; *nzc = 0;