]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: Fix bool initialization/comparison
authorThomas Meyer <thomas@m3y3r.de>
Wed, 18 Oct 2017 18:39:02 +0000 (13:39 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 18 Oct 2017 18:39:02 +0000 (13:39 -0500)
Source kernel commit: 749f24f33e87c1706d716c283027595b72a034f3

Bool initializations should use true and false. Bool tests don't need
comparisons.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c
libxfs/xfs_ialloc.c

index 4e31906fd76f1d4f8b63939c0c4feb507f8510a8..7ba572432152468f8851536a9f3adad36d13959a 100644 (file)
@@ -1468,14 +1468,14 @@ xfs_bmap_isaeof(
        int                     is_empty;
        int                     error;
 
-       bma->aeof = 0;
+       bma->aeof = false;
        error = xfs_bmap_last_extent(NULL, bma->ip, whichfork, &rec,
                                     &is_empty);
        if (error)
                return error;
 
        if (is_empty) {
-               bma->aeof = 1;
+               bma->aeof = true;
                return 0;
        }
 
index ee3721cc03490603af2c85e191c42646e60f3aad..a63af662ac18bf84a89f9047b673e826d7ac35d8 100644 (file)
@@ -1956,7 +1956,7 @@ xfs_difree_inobt(
        if (!(mp->m_flags & XFS_MOUNT_IKEEP) &&
            rec.ir_free == XFS_INOBT_ALL_FREE &&
            mp->m_sb.sb_inopblock <= XFS_INODES_PER_CHUNK) {
-               xic->deleted = 1;
+               xic->deleted = true;
                xic->first_ino = XFS_AGINO_TO_INO(mp, agno, rec.ir_startino);
                xic->alloc = xfs_inobt_irec_to_allocmask(&rec);
 
@@ -1983,7 +1983,7 @@ xfs_difree_inobt(
 
                xfs_difree_inode_chunk(mp, agno, &rec, dfops);
        } else {
-               xic->deleted = 0;
+               xic->deleted = false;
 
                error = xfs_inobt_update(cur, &rec);
                if (error) {