]> granicus.if.org Git - graphviz/commitdiff
common protect_rsqb: remove an open coded 'agxblen'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 10 Dec 2022 04:41:44 +0000 (20:41 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 21 Dec 2022 02:54:30 +0000 (18:54 -0800)
Gitlab: #2302

lib/common/htmllex.c

index ca3ed3b60686b097fce358f6855da1d6eda98cb9..2c8febc3f33077a53df77b97853861d497fab5fc 100644 (file)
@@ -882,7 +882,7 @@ static char *findNext(char *s, agxbuf* xb)
 static void protect_rsqb(agxbuf *xb) {
 
   // if the buffer is empty, we have nothing to do
-  if (xb->buf == xb->ptr) {
+  if (agxblen(xb) == 0) {
     return;
   }