Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
environment: normalize use of prefixcmp() by removing " != 0"
author
Christian Couder
<chriscool@tuxfamily.org>
Sun, 1 Dec 2013 07:49:14 +0000
(08:49 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 5 Dec 2013 22:12:52 +0000
(14:12 -0800)
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>
environment.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
15a42a1
)
diff --git
a/environment.c
b/environment.c
index 0a15349cfe38ab76b1d1cc94878cec2a8d754bbd..cd2b0681423c7c1b5271a0e02d296d2c3062c494 100644
(file)
--- a/
environment.c
+++ b/
environment.c
@@
-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;
}