From 8767b1c84a910cce562059abad5bbf14e72434a0 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 25 Oct 2024 10:24:32 +0300 Subject: [PATCH] Remove useless check * src/exclist.c (info_attach_exclist): Don't check whether dir is NULL. It can't be. --- src/exclist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exclist.c b/src/exclist.c index 6c1a3dfd..6585ac1c 100644 --- a/src/exclist.c +++ b/src/exclist.c @@ -80,7 +80,7 @@ info_attach_exclist (struct tar_stat_info *dir) return; for (file = excfile_head; file; file = file->next) { - if (faccessat (dir ? dir->fd : chdir_fd, file->name, F_OK, 0) == 0) + if (faccessat (dir->fd, file->name, F_OK, 0) == 0) { FILE *fp; struct exclude *ex = NULL; -- 2.47.2