From d64324cb60e4d0e1f5fdc1d3319c79ddbf5d0eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20B=C3=B6gershausen?= Date: Wed, 12 Sep 2018 21:32:02 +0200 Subject: Make git_check_attr() a void function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- attr.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'attr.c') diff --git a/attr.c b/attr.c index 98e4953f6e..60d284796d 100644 --- a/attr.c +++ b/attr.c @@ -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, -- cgit v1.2.3