From 7ec7002f866616c12bf469b6679cfbfd997a405a Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 30 Sep 2022 19:20:22 -0700 Subject: [PATCH] gv2gxl isLocatorType: use 'startswith' to abbreviate a 'strncmp' --- cmd/tools/gv2gxl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/tools/gv2gxl.c b/cmd/tools/gv2gxl.c index 7f0b8f7d3..ab60c911c 100644 --- a/cmd/tools/gv2gxl.c +++ b/cmd/tools/gv2gxl.c @@ -42,7 +42,6 @@ #define GXL_LOC "_gxl_locator_" #define GXL_COMP_LEN (SLEN(GXL_COMP)) -#define GXL_LOC_LEN (SLEN(GXL_LOC)) typedef struct { Agrec_t h; @@ -179,7 +178,7 @@ static int isGxlGrammar(char *name) static int isLocatorType(char *name) { - return (strncmp(name, GXL_LOC, GXL_LOC_LEN) == 0); + return startswith(name, GXL_LOC); } static void *idexists(Dt_t * ids, char *id) -- 2.40.0