]> granicus.if.org Git - graphviz/commitdiff
simplify xdot_str_xbuf with agxbprint
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Sep 2020 17:24:22 +0000 (10:24 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 17 Sep 2020 04:08:23 +0000 (21:08 -0700)
plugin/core/gvrender_core_dot.c

index 1e72e552320ba02b4095bdb3e5138300fe605419..37ec8048be6a22b976dd0f001310fedfca9d7039 100644 (file)
@@ -84,12 +84,7 @@ static xdot_state_t* xd;
 
 static void xdot_str_xbuf (agxbuf* xb, char* pfx, char* s)
 {
-    char buf[BUFSIZ];
-
-    sprintf (buf, "%s%d -", pfx, (int)strlen(s));
-    agxbput(xb, buf);
-    agxbput(xb, s);
-    agxbputc(xb, ' ');
+    agxbprint (xb, "%s%d -%s ", pfx, (int)strlen(s), s);
 }
 
 static void xdot_str (GVJ_t *job, char* pfx, char* s)