From e443e96d2900cab43c801477deb633f3fa558c0b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 9 Sep 2022 20:10:04 -0700 Subject: [PATCH] sfdpgen maximal_independent_edge_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. --- lib/sfdpgen/Multilevel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sfdpgen/Multilevel.c b/lib/sfdpgen/Multilevel.c index 31c523a5a..09384badf 100644 --- a/lib/sfdpgen/Multilevel.c +++ b/lib/sfdpgen/Multilevel.c @@ -198,7 +198,7 @@ static void maximal_independent_edge_set(SparseMatrix A, int randomize, int **ma m = A->m; n = A->n; assert(n == m); - *matching = N_GNEW(m,int); + *matching = gv_calloc(m, sizeof(int)); for (i = 0; i < m; i++) (*matching)[i] = i; *nmatch = n; -- 2.40.0