From f18439c54113a6a0cf221cd894827f50ec2d2f9b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Sep 2020 10:21:09 -0700 Subject: [PATCH] simplify clustNode with agxbprint --- lib/common/utils.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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); -- 2.50.1