[PATCH v2 86/86] strbuf: remove prefixcmp() as it has been replaced with starts_with()
- From
Christian Couder <chriscool@tuxfamily.org>
- Date
- Nov 17, 2013, 22:07 UTC
- Message-ID
- <20131117220719.4386.4388.chriscool@tuxfamily.org>
- In-Reply-To
- <20131117215732.4386.19345.chriscool@tuxfamily.org>
prefixcmp() is now useless as the previous commit replaced it everywhere with starts_with(). So let's now remove it.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> --- git-compat-util.h | 1 - strbuf.c | 9 --------- 2 files changed, 10 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h index e441a6b..c4c01e7 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -350,7 +350,6 @@ extern void set_die_routine(NORETURN_PTR void (*routine)(const char *err, va_lis extern void set_error_routine(void (*routine)(const char *err, va_list params)); extern void set_die_is_recursing_routine(int (*routine)(void)); -extern int prefixcmp(const char *str, const char *prefix); extern int starts_with(const char *str, const char *prefix); extern int ends_with(const char *str, const char *suffix); diff --git a/strbuf.c b/strbuf.c index 933d998..ee96dcf 100644 --- a/strbuf.c +++ b/strbuf.c @@ -1,15 +1,6 @@ #include "cache.h" #include "refs.h" -int prefixcmp(const char *str, const char *prefix) -{ - for (; ; str++, prefix++) - if (!*prefix) - return 0; - else if (*str != *prefix) - return (unsigned char)*prefix - (unsigned char)*str; -} - int starts_with(const char *str, const char *prefix) { for (; ; str++, prefix++)
-- 1.8.4.1.561.g12affca