]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Remove xattrs_clear_setup
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Nov 2024 16:40:36 +0000 (09:40 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 2 Nov 2024 06:47:23 +0000 (23:47 -0700)
It’s never actually called.
* src/xattrs.c (clear_mask_map, xattrs_clear_setup):
Remove.  All uses removed.

src/tar.c
src/xattrs.c
src/xattrs.h

index e096d156585b85cf9e8a5b8f3da5df304f3b786b..fb1f64631b7cb0348657180eed2dbed0f453c93d 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -2940,10 +2940,7 @@ main (int argc, char **argv)
   /* There is little point to freeing, as we are about to exit,
      and freeing is more likely to cause than cure trouble.  */
   if (false)
-    {
-      free (archive_name_array);
-      xattrs_clear_setup ();
-    }
+    free (archive_name_array);
 
   if (exit_status == TAREXIT_FAILURE)
     error (0, 0, _("Exiting with failure status due to previous errors"));
index 1683a531e1dac75970356381bff424054d2602f9..5558293df21aa2146fc2654c3bd7b9fa8e161c4e 100644 (file)
@@ -520,20 +520,6 @@ xattrs_mask_add (const char *mask, bool incl)
   mask_map->masks[mask_map->used++] = mask;
 }
 
-static void
-clear_mask_map (struct xattrs_mask_map *mask_map)
-{
-  if (mask_map->size)
-    free (mask_map->masks);
-}
-
-void
-xattrs_clear_setup (void)
-{
-  clear_mask_map (&xattrs_setup.incl);
-  clear_mask_map (&xattrs_setup.excl);
-}
-
 static bool xattrs_masked_out (const char *kw, bool archiving);
 
 /* get xattrs from file given by FILE_NAME or FD (when non-zero)
index 71c376351d21e4db97665a21eaad9ff0ddc975c5..8ce7b661652afc3355c87467d20e0c395e252e45 100644 (file)
@@ -26,9 +26,6 @@
    to true/false if you want to add include/exclude pattern */
 extern void xattrs_mask_add (const char *mask, bool incl);
 
-/* clear helping structures when tar finishes */
-extern void xattrs_clear_setup (void);
-
 extern void xattrs_acls_get (int parentfd, char const *file_name,
                             struct tar_stat_info *st, int xisfile);
 extern void xattrs_selinux_get (int parentfd, char const *file_name,