Make git_check_attr() a void function

git_check_attr() returns always 0.
Remove all the error handling code of the callers, which is never executed.
Change git_check_attr() to be a void function.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Torsten Bögershausen
2018-09-12 21:32:02 +02:00
committed by Junio C Hamano
parent 1d4361b0f3
commit d64324cb60
9 changed files with 57 additions and 69 deletions

8
attr.c
View File

@ -1143,9 +1143,9 @@ static void collect_some_attrs(const struct index_state *istate,
fill(path, pathlen, basename_offset, check->stack, check->all_attrs, rem);
}
int git_check_attr(const struct index_state *istate,
const char *path,
struct attr_check *check)
void git_check_attr(const struct index_state *istate,
const char *path,
struct attr_check *check)
{
int i;
@ -1158,8 +1158,6 @@ int git_check_attr(const struct index_state *istate,
value = ATTR__UNSET;
check->items[i].value = value;
}
return 0;
}
void git_all_attrs(const struct index_state *istate,