On Dec 30, 2007 3:50 PM, Marco Costalba <mcostalba@xxxxxxxxx> wrote: > > If *prefix == "" case is to be considered I vote for your/Johannes > version because it's "better code" (tm). > Ok this is fast and correct static inline int prefixcmp(const char *str, const char *prefix) { while (*str == *prefix && *prefix) str++, prefix++; return (*prefix ? *(unsigned const char *)prefix - *(unsigned const char *)str : 0); } This is the last one, I promise ;-) Marco - To unsubscribe from this list: 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