From: Matthew Fernandez Date: Sun, 6 Sep 2020 17:21:09 +0000 (-0700) Subject: simplify clustNode with agxbprint X-Git-Tag: 2.46.0~20^2^2~77^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f18439c54113a6a0cf221cd894827f50ec2d2f9b;p=graphviz simplify clustNode with agxbprint --- diff --git a/lib/common/utils.c b/lib/common/utils.c index e92629506..3aeac0c8f 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -957,13 +957,8 @@ static node_t *clustNode(node_t * n, graph_t * cg, agxbuf * xb, { node_t *cn; static int idx = 0; - char num[100]; - agxbput(xb, "__"); - sprintf(num, "%d", idx++); - agxbput(xb, num); - agxbputc(xb, ':'); - agxbput(xb, agnameof(cg)); + agxbprint(xb, "__%d:%s", idx++, agnameof(cg)); cn = agnode(agroot(cg), agxbuse(xb), 1); agbindrec(cn, "Agnodeinfo_t", sizeof(Agnodeinfo_t), TRUE);