Skip to content

Commit a4552ce

Browse files
chriscoolgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 15a42a1 commit a4552ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

environment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ const char *get_git_namespace(void)
171171

172172
const char *strip_namespace(const char *namespaced_ref)
173173
{
174-
if (prefixcmp(namespaced_ref, get_git_namespace()) != 0)
174+
if (prefixcmp(namespaced_ref, get_git_namespace()))
175175
return NULL;
176176
return namespaced_ref + namespace_len;
177177
}

0 commit comments

Comments
 (0)