From: Paul Eggert Date: Sat, 3 Aug 2024 06:30:42 +0000 (-0700) Subject: Simplify ST_DEV_MSB X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51c841b92736697358cb126af2a9738972788359;p=thirdparty%2Ftar.git Simplify ST_DEV_MSB * src/incremen.c (ST_DEV_MSB): Use TYPE_WIDTH rather than computing it by hand. --- diff --git a/src/incremen.c b/src/incremen.c index 41dc8b10..5d14e5b8 100644 --- a/src/incremen.c +++ b/src/incremen.c @@ -216,7 +216,7 @@ static Hash_table *directory_meta_table; static char const nfs_string[] = "nfs"; # define NFS_FILE_STAT(st) (strcmp ((st).st_fstype, nfs_string) == 0) #else -# define ST_DEV_MSB(st) (~ (dev_t) 0 << (sizeof (st).st_dev * CHAR_BIT - 1)) +# define ST_DEV_MSB(st) (~ (dev_t) 0 << (TYPE_WIDTH ((st).st_dev) - 1)) # define NFS_FILE_STAT(st) (((st).st_dev & ST_DEV_MSB (st)) != 0) #endif