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()
This commit is contained in:
11
apply.c
11
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.
|
||||
|
||||
Reference in New Issue
Block a user