On Thu, Aug 10, 2006 at 05:02:30PM +0200, Rene Scharfe wrote: > +static inline int has_extension(const char *filename, int len, const char *ext) > +{ > + int extlen = strlen(ext); > + return len > extlen && !memcmp(filename + len - extlen, ext, extlen); > +} > + Wouldn't this function be much easier to use if len is computed from filename with strlen? (after a quick look through the other patches I couldn't find a call site where filename wasn't NUL-terminated) - Fredrik - : send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html