]> granicus.if.org Git - graphviz/commitdiff
gvc gvPluginList: abbreviate an open coded 'strview_str'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 11 Aug 2022 02:35:17 +0000 (19:35 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 12 Aug 2022 04:27:02 +0000 (21:27 -0700)
lib/gvc/gvplugin.c

index 1a3faf0bf10d7cf5f2e7a8d8b3e552a3596ead41..542c1f2e3706fb89f7d7ec386c2c74c5c53f4de0 100644 (file)
@@ -424,7 +424,7 @@ char **gvPluginList(GVC_t * gvc, const char *kind, int *sz, const char *str)
         strview_t q = strview(pnext->typestr, ':');
         if (!typestr_last.data || !strview_case_eq(typestr_last, q)) {
             list = RALLOC(cnt + 1, list, char *);
-            list[cnt++] = gv_strndup(q.data, q.size);
+            list[cnt++] = strview_str(q);
         }
         typestr_last = q;
     }