]> granicus.if.org Git - graphviz/commitdiff
cgraph agxbuf: remove an open coded 'agxbclear'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 15 Dec 2022 16:30:20 +0000 (08:30 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Dec 2022 02:54:30 +0000 (18:54 -0800)
This will ease some upcoming changes.

Gitlab: #2302

lib/cgraph/agxbuf.h

index e2910fea2202a7bf8575dd17cd7ca0a0dce9050e..9aa45ccdb83b1650f1275f166aee2d87f122ce03 100644 (file)
@@ -215,7 +215,7 @@ static inline void agxbclear(agxbuf *xb) { xb->size = 0; }
  */
 static inline char *agxbuse(agxbuf *xb) {
   (void)agxbputc(xb, '\0');
-  xb->size = 0;
+  agxbclear(xb);
   return xb->buf;
 }