]> granicus.if.org Git - graphviz/commitdiff
fdpgen layout: use cgraph wrapper for allocation
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 18 Nov 2022 01:14:41 +0000 (17:14 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 23 Nov 2022 04:08:54 +0000 (20:08 -0800)
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/fdpgen/layout.c

index a60363bc34bcf1d4c2f794dec6810075f56bafc5..086cffed3b8f4ed0cffd8e939932d356b9f4a36f 100644 (file)
@@ -901,7 +901,7 @@ static int layout(graph_t * g, layout_info * infop)
     if (c_cnt > 1) {
        bool *bp;
        if (pinned) {
-           bp = N_NEW(c_cnt, bool);
+           bp = gv_calloc(c_cnt, sizeof(bool));
            bp[0] = true;
        } else
            bp = NULL;