aboutsummaryrefslogtreecommitdiffstats
path: root/compressor.c
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-04-27 21:15:10 -0400
committerSam Anthony <sam@samanthony.xyz>2025-04-27 21:15:10 -0400
commit97523ee06ffba9ffd4578c016aa2a2b77662e090 (patch)
tree56ac70f6d279c17d750295ebfad94d80139fcbcc /compressor.c
parent0b8200986863266f3d24c01d1817f2a2cda983ea (diff)
downloadvolute-97523ee06ffba9ffd4578c016aa2a2b77662e090.zip
fix toml_filter() in compressor.c
Diffstat (limited to 'compressor.c')
-rw-r--r--compressor.c6
1 files 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