From: Matthew Fernandez Date: Sun, 6 Sep 2020 16:55:53 +0000 (-0700) Subject: simplify initAnchor with agxbprint X-Git-Tag: 2.46.0~20^2^2~77^2~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65d3b8ef1666496ad8677081a8807eb6ef498ce4;p=graphviz simplify initAnchor with agxbprint --- diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 39750dac9..a01fd8bf1 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -379,7 +379,6 @@ initAnchor(GVJ_t * job, htmlenv_t * env, htmldata_t * data, boxf b, static int anchorId; int internalId = 0; agxbuf xb; - char intbuf[30]; /* hold 64-bit decimal integer */ unsigned char buf[SMALLBUF]; save->url = obj->url; @@ -394,9 +393,7 @@ initAnchor(GVJ_t * job, htmlenv_t * env, htmldata_t * data, boxf b, env->objid = strdup(getObjId(job, obj->u.n, &xb)); env->objid_set = 1; } - agxbput(&xb, env->objid); - sprintf(intbuf, "_%d", anchorId++); - agxbput(&xb, intbuf); + agxbprint(&xb, "%s_%d", env->objid, anchorId++); id = agxbuse(&xb); internalId = 1; }