From: Matthew Fernandez Date: Sat, 1 Oct 2022 02:19:34 +0000 (-0700) Subject: gv2gxl isGxlGrammar: use 'startswith' to abbreviate a 'strncmp' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a21cc71767f592360a409b224341c9a3102e20f;p=graphviz gv2gxl isGxlGrammar: use 'startswith' to abbreviate a 'strncmp' --- diff --git a/cmd/tools/gv2gxl.c b/cmd/tools/gv2gxl.c index 979fed6d2..7f0b8f7d3 100644 --- a/cmd/tools/gv2gxl.c +++ b/cmd/tools/gv2gxl.c @@ -14,6 +14,7 @@ *************************************************************************/ #include +#include #include #include #include "convert.h" @@ -173,7 +174,7 @@ static int xml_url_puts(FILE *f, const char *s) { static int isGxlGrammar(char *name) { - return (strncmp(name, GXL_ATTR, (sizeof(GXL_ATTR) - 1)) == 0); + return startswith(name, GXL_ATTR); } static int isLocatorType(char *name)