From: Matthew Fernandez Date: Sun, 6 Sep 2020 17:54:43 +0000 (-0700) Subject: simplify scanEntity with agxbprint X-Git-Tag: 2.46.0~20^2^2~77^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e44a0efe526ac04cc3f721f8d471ff244e2bf9b;p=graphviz simplify scanEntity with agxbprint --- diff --git a/lib/common/utils.c b/lib/common/utils.c index 3aeac0c8f..d891bae87 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1365,10 +1365,7 @@ char* scanEntity (char* t, agxbuf* xb) res = bsearch(&key, entities, NR_OF_ENTITIES, sizeof(entities[0]), comp_entities); if (!res) return t; - sprintf (buf, "%d", res->value); - agxbputc(xb, '#'); - agxbput(xb, buf); - agxbputc(xb, ';'); + agxbprint(xb, "#%d;", res->value); return (endp+1); }