]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Remove useless check
authorSergey Poznyakoff <gray@gnu.org>
Fri, 25 Oct 2024 07:24:32 +0000 (10:24 +0300)
committerSergey Poznyakoff <gray@gnu.org>
Fri, 25 Oct 2024 07:24:32 +0000 (10:24 +0300)
* src/exclist.c (info_attach_exclist): Don't check whether dir
is NULL. It can't be.

src/exclist.c

index 6c1a3dfd20ebc3cc2a2b8deed3e94094b921ff61..6585ac1c65758a6c8d2b960488e38cec80054938 100644 (file)
@@ -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;