From 9e44a0efe526ac04cc3f721f8d471ff244e2bf9b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Sep 2020 10:54:43 -0700 Subject: [PATCH] simplify scanEntity with agxbprint --- lib/common/utils.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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); } -- 2.40.0