summaryrefslogtreecommitdiffstats
path: root/apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-06-22 23:15:21 +0200
committerJunio C Hamano <gitster@pobox.com>2017-06-22 23:15:21 +0200
commit52ab95cfea15ae8a60fb4febc99d54034c8800b8 (patch)
treeba06be7965dcd1ed226dab1cbb3cf70818bb187d /apply.c
parentMerge branch 'sb/t4005-modernize' (diff)
parentdir: create function count_slashes() (diff)
downloadgit-52ab95cfea15ae8a60fb4febc99d54034c8800b8.tar.xz
git-52ab95cfea15ae8a60fb4febc99d54034c8800b8.zip
Merge branch 'pc/dir-count-slashes'
Three instances of the same helper function have been consolidated to one. * pc/dir-count-slashes: dir: create function count_slashes()
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/apply.c b/apply.c
index 854faa6779..679ed7732d 100644
--- a/apply.c
+++ b/apply.c
@@ -762,17 +762,6 @@ static char *find_name_traditional(struct apply_state *state,
return find_name_common(state, line, def, p_value, line + len, 0);
}
-static int count_slashes(const char *cp)
-{
- int cnt = 0;
- char ch;
-
- while ((ch = *cp++))
- if (ch == '/')
- cnt++;
- return cnt;
-}
-
/*
* Given the string after "--- " or "+++ ", guess the appropriate
* p_value for the given patch.