]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: convert single-bit bitfields to bools
authorEric Sandeen <sandeen@redhat.com>
Wed, 17 Oct 2018 18:24:56 +0000 (13:24 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 17 Oct 2018 18:24:56 +0000 (13:24 -0500)
Sparse doesn't like signed single-bit bitfields, and they may as well
just be booleans.

Fixes sparse warnings about this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/check.c
db/io.h

index e0fd9860b7abb77efcf9e95f92155402f30d16be..683e176111b60cbe30f904b21a2187c10f7edc3d 100644 (file)
@@ -41,8 +41,8 @@ typedef struct inodata {
        struct inodata  *next;
        nlink_t         link_set;
        nlink_t         link_add;
-       char            isdir:1;
-       char            isreflink:1;
+       bool            isdir;
+       bool            isreflink;
        char            security;
        char            ilist;
        xfs_ino_t       ino;
diff --git a/db/io.h b/db/io.h
index 8d5720bf942de6b3a6a5709ca845bf3c2484d3a9..7618be43b77fc5bd1f96738a88c824bca002fd66 100644 (file)
--- a/db/io.h
+++ b/db/io.h
@@ -26,10 +26,10 @@ typedef struct iocur {
        const struct typ        *typ;   /* type of "data" */
        bbmap_t                 *bbmap; /* map daddr if fragmented */
        struct xfs_buf          *bp;    /* underlying buffer */
-       int                     ino_crc_ok:1;
-       int                     ino_buf:1;
-       int                     dquot_buf:1;
-       int                     need_crc:1;
+       bool                    ino_crc_ok;
+       bool                    ino_buf;
+       bool                    dquot_buf;
+       bool                    need_crc;
 } iocur_t;
 
 #define DB_RING_ADD 1                   /* add to ring on set_cur */