From 51c841b92736697358cb126af2a9738972788359 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 2 Aug 2024 23:30:42 -0700 Subject: [PATCH] Simplify ST_DEV_MSB * src/incremen.c (ST_DEV_MSB): Use TYPE_WIDTH rather than computing it by hand. --- src/incremen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2