]> granicus.if.org Git - graphviz/commitdiff
remove an unnecessary intermediate buffer
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 22 Nov 2020 05:57:26 +0000 (21:57 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 23 Jan 2021 19:24:27 +0000 (11:24 -0800)
lib/fdpgen/layout.c

index d52372949a13d1056421c75a30a1dfe8d0e02c91..cba556ef8c15d447a297e5b16f0451d1910d860d 100644 (file)
@@ -421,15 +421,14 @@ static graph_t *deriveGraph(graph_t * g, layout_info * infop)
     graph_t *dg;
     node_t *dn;
     graph_t *subg;
-    char name[100];
     bport_t *pp;
     node_t *n;
     edge_t *de;
     int i, id = 0;
 
-    sprintf(name, "_dg_%d", infop->gid++);
     if (Verbose >= 2)
-       fprintf(stderr, "derive graph %s of %s\n", name, agnameof(g));
+       fprintf(stderr, "derive graph _dg_%d of %s\n", infop->gid, agnameof(g));
+    infop->gid++;
 
     dg = agopen("derived", Agstrictdirected,NIL(Agdisc_t *));
     agbindrec(dg, "Agraphinfo_t", sizeof(Agraphinfo_t), TRUE);