]> granicus.if.org Git - graphviz/commitdiff
ortho extractHChans: use cgraph wrapper for allocation
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Sep 2022 17:57:12 +0000 (10:57 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 4 Sep 2022 23:32:29 +0000 (16:32 -0700)
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/ortho/ortho.c

index 3bf6547973952a562c4ff9b34e7770f2cf19e2dd..55ddae521829ecf88f0e92d640884d4d8923da99 100644 (file)
@@ -370,7 +370,7 @@ extractHChans (maze* mp)
            cp = nextcp;
        }
 
-       chp = NEW(channel);
+       chp = gv_alloc(sizeof(channel));
        chp->cp = cp;
        chp->p.p1 = cp->bb.LL.x;