]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Fewer macros in xattrs.c
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Aug 2024 16:55:32 +0000 (09:55 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 19 Aug 2024 16:57:13 +0000 (09:57 -0700)
* src/xattrs.c (XATTRS_PREFIX, XATTRS_PREFIX_LEN, USER_DOT_PFX):
Now constants, not macros.

src/xattrs.c

index f8f6c29541ff2e4f29758d2fdc00df8c86245e45..1683a531e1dac75970356381bff424054d2602f9 100644 (file)
@@ -30,8 +30,8 @@
 #include "xattr-at.h"
 #include "selinux-at.h"
 
-#define XATTRS_PREFIX "SCHILY.xattr."
-#define XATTRS_PREFIX_LEN (sizeof XATTRS_PREFIX - 1)
+static char const XATTRS_PREFIX[] = "SCHILY.xattr.";
+enum { XATTRS_PREFIX_LEN = sizeof XATTRS_PREFIX - 1 };
 
 void
 xheader_xattr_init (struct tar_stat_info *st)
@@ -713,11 +713,10 @@ xattrs_matches_mask (const char *kw, struct xattrs_mask_map *mm)
   return false;
 }
 
-#define USER_DOT_PFX "user."
-
 static bool
 xattrs_kw_included (const char *kw, bool archiving)
 {
+  static char const USER_DOT_PFX[] = "user.";
   if (xattrs_setup.incl.size)
     return xattrs_matches_mask (kw, &xattrs_setup.incl);
   else if (archiving)