From d64324cb60e4d0e1f5fdc1d3319c79ddbf5d0eb2 Mon Sep 17 00:00:00 2001 From: Torsten Bögershausen 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 --- userdiff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'userdiff.c') diff --git a/userdiff.c b/userdiff.c index f3f4be579c..f565f6731d 100644 --- a/userdiff.c +++ b/userdiff.c @@ -278,8 +278,7 @@ struct userdiff_driver *userdiff_find_by_path(const char *path) check = attr_check_initl("diff", NULL); if (!path) return NULL; - if (git_check_attr(&the_index, path, check)) - return NULL; + git_check_attr(&the_index, path, check); if (ATTR_TRUE(check->items[0].value)) return &driver_true; -- cgit v1.2.3