Add prefixcmp()
We have too many strncmp(a, b, strlen(b)). Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
@ -279,4 +279,9 @@ static inline int sane_case(int x, int high)
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int prefixcmp(const char *str, const char *prefix)
|
||||||
|
{
|
||||||
|
return strncmp(str, prefix, strlen(prefix));
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user