From: Paul Eggert Date: Mon, 19 Aug 2024 16:55:32 +0000 (-0700) Subject: Fewer macros in xattrs.c X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8b3073e1d2ef79e6bd578fdd5e2dd448876c0fc7;p=thirdparty%2Ftar.git Fewer macros in xattrs.c * src/xattrs.c (XATTRS_PREFIX, XATTRS_PREFIX_LEN, USER_DOT_PFX): Now constants, not macros. --- diff --git a/src/xattrs.c b/src/xattrs.c index f8f6c295..1683a531 100644 --- a/src/xattrs.c +++ b/src/xattrs.c @@ -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)