The motivation for this change is to avoid passing a variable to agerr which
triggers so -Wformat-security errors after some upcoming changes. However, it's
nice to be able to just simplify this code anyway.
static void opensubg(char *name)
{
if (++SubgraphDepth >= YYMAXDEPTH/2) {
- char buf[128];
- sprintf(buf,"subgraphs nested more than %d deep",YYMAXDEPTH);
- agerr(AGERR,buf);
+ agerr(AGERR,"subgraphs nested more than %d deep",YYMAXDEPTH);
}
S = push(S,agsubg(S->g,name,TRUE));
agstrfree(G,name);