diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-17 23:47:35 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-18 00:02:44 +0400 |
commit | ad7044857660af7ffaaf8fbbccc77b817d1b938f (patch) | |
tree | b77a7390dbbc1901e13d74c1738f327e5fa8154d /test-string-list.c | |
parent | 14a9c5f261bcc436b80700076257f02af0beec68 (diff) | |
parent | 59556548230e617b837343c2c07e357e688e2ca4 (diff) |
Merge branch 'cc/starts-n-ends-with'
Remove a few duplicate implementations of prefix/suffix comparison
functions, and rename them to starts_with and ends_with.
* cc/starts-n-ends-with:
replace {pre,suf}fixcmp() with {starts,ends}_with()
strbuf: introduce starts_with() and ends_with()
builtin/remote: remove postfixcmp() and use suffixcmp() instead
environment: normalize use of prefixcmp() by removing " != 0"
Diffstat (limited to 'test-string-list.c')
-rw-r--r-- | test-string-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test-string-list.c b/test-string-list.c index 00ce6c9a12..14bdf9d215 100644 --- a/test-string-list.c +++ b/test-string-list.c @@ -38,7 +38,7 @@ static void write_list_compact(const struct string_list *list) static int prefix_cb(struct string_list_item *item, void *cb_data) { const char *prefix = (const char *)cb_data; - return !prefixcmp(item->string, prefix); + return starts_with(item->string, prefix); } int main(int argc, char **argv) |