From 89ca0855bc97aba25d8c7847d12b3c577e7a07f5 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Fri, 30 Sep 2022 19:21:55 -0700 Subject: [PATCH] gv2gxl writeDict: use 'startswith' to abbreviate a 'strncmp' --- cmd/tools/gv2gxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/tools/gv2gxl.c b/cmd/tools/gv2gxl.c index ab60c911c..9d990496a 100644 --- a/cmd/tools/gv2gxl.c +++ b/cmd/tools/gv2gxl.c @@ -399,7 +399,7 @@ writeDict(Agraph_t * g, FILE * gxlFile, char *name, Dict_t * dict, } } else { /* gxl attr; check for special cases like composites */ - if (strncmp(sym->name, GXL_COMP, GXL_COMP_LEN) == 0) { + if (startswith(sym->name, GXL_COMP)) { if (EMPTY(sym->defval)) { if (view == NULL) continue; -- 2.40.0