}
}
-static inline int has_extension(const char *filename, int len, const char *ext)
+static inline int has_extension(const char *filename, const char *ext)
{
- int extlen = strlen(ext);
+ size_t len = strlen(filename);
+ size_t extlen = strlen(ext);
return len > extlen && !memcmp(filename + len - extlen, ext, extlen);
}