From: Matthew Fernandez Date: Sat, 11 Sep 2021 18:27:30 +0000 (-0700) Subject: gvpr mkBlock: remove an unnecessary use of an sfio buffer X-Git-Tag: 2.49.1~14^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1514d069bc803c6350cd745ceca6b1cc35a88a0d;p=graphviz gvpr mkBlock: remove an unnecessary use of an sfio buffer Related to #1873, #1998. --- diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c index e41380a9a..2442ac609 100644 --- a/lib/gvpr/compile.c +++ b/lib/gvpr/compile.c @@ -2371,11 +2371,13 @@ static int mkBlock(comp_block* bp, Expr_t * prog, char *src, parse_block *inp, S codePhase = 1; if (inp->begg_stmt) { - sfprintf(tmps, "_begin_g_%d", i); + static const char PREFIX[] = "_begin_g_"; + char label[sizeof(PREFIX) - 1 + CHARS_FOR_NUL_TERM_INT - 1 + 1 /* for NUL */]; + snprintf(label, sizeof(label), "%s%d", PREFIX, i); symbols[0].type = T_graph; tchk[V_this][1] = Y(G); bp->begg_stmt = compile(prog, src, inp->begg_stmt, - inp->l_beging, sfstruse(tmps), 0, VOIDTYPE); + inp->l_beging, label, 0, VOIDTYPE); if (getErrorErrors()) goto finishBlk; rv |= BEGG;