environment: normalize use of prefixcmp() by removing " != 0"
To be able to automatically convert prefixcmp() to starts_with() we need first to make sure that prefixcmp() is always used in the same way. So let's remove " != 0" after prefixcmp(). Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
15a42a10ec
commit
a4552ceb8a
@ -171,7 +171,7 @@ const char *get_git_namespace(void)
|
|||||||
|
|
||||||
const char *strip_namespace(const char *namespaced_ref)
|
const char *strip_namespace(const char *namespaced_ref)
|
||||||
{
|
{
|
||||||
if (prefixcmp(namespaced_ref, get_git_namespace()) != 0)
|
if (prefixcmp(namespaced_ref, get_git_namespace()))
|
||||||
return NULL;
|
return NULL;
|
||||||
return namespaced_ref + namespace_len;
|
return namespaced_ref + namespace_len;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user