From 8a21cc71767f592360a409b224341c9a3102e20f Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 30 Sep 2022 19:19:34 -0700 Subject: [PATCH] gv2gxl isGxlGrammar: use 'startswith' to abbreviate a 'strncmp' --- cmd/tools/gv2gxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.40.0