Skip to content

Commit

Permalink
environment: normalize use of prefixcmp() by removing " != 0"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Dec 5, 2013
1 parent 15a42a1 commit a4552ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const char *get_git_namespace(void)

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 namespaced_ref + namespace_len;
}
Expand Down

0 comments on commit a4552ce

Please sign in to comment.