From 97523ee06ffba9ffd4578c016aa2a2b77662e090 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Sun, 27 Apr 2025 21:15:10 -0400 Subject: fix toml_filter() in compressor.c --- compressor.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/compressor.c b/compressor.c index 9bc0257..0fdee78 100644 --- a/compressor.c +++ b/compressor.c @@ -269,14 +269,12 @@ cmp_flow_unit(const void *key, const void *datum) { static int toml_filter(const struct dirent *de) { const char *extension; - size_t length, n; - char toml[] = ".toml"; + size_t length; if (!cwk_path_get_extension(de->d_name, &extension, &length)) { return 0; /* no extension. */ } - n = min(nelem(toml)-1, length); - return strncmp(".toml", extension, n) == 0; /* extension is ".toml". */ + return strcmp(".toml", extension) == 0; /* extension is ".toml". */ } static void -- cgit v1.2.3