]> granicus.if.org Git - graphviz/commitdiff
cgraph: remove initial '\0' store to new agxbuf
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Dec 2022 04:08:04 +0000 (20:08 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Dec 2022 02:54:30 +0000 (18:54 -0800)
Nothing in the code base relies on this. Callers always use `agxbuse` before
relying on the buffer being NUL terminated.

Gitlab: #2302

lib/cgraph/agxbuf.h

index ae9e3531a118a46f8238c031f020674e0b90e789..0dc630ba98ca5de46f5dae42ce7a47720ee2b730 100644 (file)
@@ -43,7 +43,6 @@ static inline void agxbinit(agxbuf *xb, unsigned int hint, char *init) {
   }
   xb->eptr = xb->buf + hint;
   xb->ptr = xb->buf;
-  *xb->ptr = '\0';
 }
 
 /* agxbfree: