]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
fixup warnings with -Wno-parentheses removed.
authorNathan Scott <nathans@sgi.com>
Thu, 12 Apr 2001 23:49:04 +0000 (23:49 +0000)
committerNathan Scott <nathans@sgi.com>
Thu, 12 Apr 2001 23:49:04 +0000 (23:49 +0000)
19 files changed:
db/check.c
db/flist.c
db/io.c
growfs/xfs_growfs.c
include/builddefs.in
logprint/log_misc.c
mkfs/proto.c
mkfs/xfs_mkfs.c
repair/avl.c
repair/avl64.c
repair/dino_chunks.c
repair/dir.c
repair/dir2.c
repair/dir_stack.c
repair/phase3.c
repair/phase4.c
repair/phase6.c
repair/sb.c
repair/scan.c

index e23d798d8952b9dabed6da5789c7c71721938109..0eaf9caa2acffeab98b0622e0b1f36bb878ef413 100644 (file)
@@ -1855,7 +1855,7 @@ ncheck_f(
        if (ilist) {
                for (ilp = ilist; ilp < &ilist[ilist_size]; ilp++) {
                        ino = *ilp;
-                       if (p = inode_name(ino, &hp)) {
+                       if ((p = inode_name(ino, &hp))) {
                                dbprintf("%11llu %s", ino, p);
                                if (hp->isdir)
                                        dbprintf("/.");
@@ -4114,7 +4114,7 @@ scanfunc_bmap(
        (*toti)++;
        if (level == 0) {
                if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_bmap_dmxr[0] ||
-                   isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[0])  {
+                   (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[0])) {
                        if (!sflag || id->ilist || CHECK_BLIST(bno))
                                dbprintf("bad btree nrecs (%u, min=%u, max=%u) "
                                         "in inode %lld bmap block %lld\n",
@@ -4133,7 +4133,7 @@ scanfunc_bmap(
                return;
        }
        if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_bmap_dmxr[1] ||
-           isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[1])  {
+           (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[1])) {
                if (!sflag || id->ilist || CHECK_BLIST(bno))
                        dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
                                 "inode %lld bmap block %lld\n",
@@ -4180,7 +4180,7 @@ scanfunc_bno(
        set_dbmap(seqno, bno, 1, DBM_BTBNO, seqno, bno);
        if (level == 0) {
                if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_alloc_mxr[0] ||
-                   isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[0]) {
+                   (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[0])) {
                        dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
                                 "btbno block %u/%u\n",
                                INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_alloc_mnr[0],
@@ -4198,7 +4198,7 @@ scanfunc_bno(
                return;
        }
        if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_alloc_mxr[1] ||
-           isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[1]) {
+           (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[1])) {
                dbprintf("bad btree nrecs (%u, min=%u, max=%u) in btbno block "
                         "%u/%u\n",
                        INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_alloc_mnr[1],
@@ -4243,7 +4243,7 @@ scanfunc_cnt(
        set_dbmap(seqno, bno, 1, DBM_BTCNT, seqno, bno);
        if (level == 0) {
                if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_alloc_mxr[0] ||
-                   isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[0])  {
+                   (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[0])) {
                        dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
                                 "btbno block %u/%u\n",
                                INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_alloc_mnr[0],
@@ -4265,7 +4265,7 @@ scanfunc_cnt(
                return;
        }
        if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_alloc_mxr[1] ||
-           isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[1])  {
+           (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_alloc_mnr[1])) {
                dbprintf("bad btree nrecs (%u, min=%u, max=%u) in btbno block "
                         "%u/%u\n",
                        INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_alloc_mnr[1],
@@ -4314,7 +4314,7 @@ scanfunc_ino(
        set_dbmap(seqno, bno, 1, DBM_BTINO, seqno, bno);
        if (level == 0) {
                if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_inobt_mxr[0] ||
-                   isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_inobt_mnr[0]) {
+                   (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_inobt_mnr[0])) {
                        dbprintf("bad btree nrecs (%u, min=%u, max=%u) in "
                                 "inobt block %u/%u\n",
                                INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_inobt_mnr[0],
@@ -4359,7 +4359,7 @@ scanfunc_ino(
                                continue;
                        }
                        for (j = 0, nfree = 0; j < XFS_INODES_PER_CHUNK; j++) {
-                               if (isfree = XFS_INOBT_IS_FREE(&rp[i], j, ARCH_CONVERT))
+                               if ((isfree = XFS_INOBT_IS_FREE(&rp[i], j, ARCH_CONVERT)))
                                        nfree++;
                                process_inode(agf, agino + j,
                                        (xfs_dinode_t *)((char *)iocur_top->data + ((off + j) << mp->m_sb.sb_inodelog)),
@@ -4379,7 +4379,7 @@ scanfunc_ino(
                return;
        }
        if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_inobt_mxr[1] ||
-           isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_inobt_mnr[1]) {
+           (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_inobt_mnr[1])) {
                dbprintf("bad btree nrecs (%u, min=%u, max=%u) in inobt block "
                         "%u/%u\n",
                        INT_GET(block->bb_numrecs, ARCH_CONVERT), mp->m_inobt_mnr[1],
index fd5e191084bc8890492b2b19f6619c42d3a77e38..598550058ce3453a4af8c0f7d7bb566cf09efcfd 100644 (file)
@@ -402,7 +402,7 @@ flist_split(
                } else if (strchr(numchars, *s)) {
                        l = (int)strspn(s, xnumchars);
                        t = TT_NUM;
-               } else if (a = strchr(punctchars, *s)) {
+               } else if ((a = strchr(punctchars, *s))) {
                        l = 1;
                        t = puncttypes[a - punctchars];
                } else {
diff --git a/db/io.c b/db/io.c
index bb247b98f85561fafe19fa10858e3b38502366a6..6ea949dc399058f5cdc6f328409d0f019ef6b834 100644 (file)
--- a/db/io.c
+++ b/db/io.c
@@ -586,7 +586,7 @@ set_cur(
        iocur_top->ino = ino;
        iocur_top->dirino = dirino;
        iocur_top->mode = mode;
-       if (iocur_top->use_bbmap = (bbmap != NULL))
+       if ((iocur_top->use_bbmap = (bbmap != NULL)))
                iocur_top->bbmap = *bbmap;
 
        /* store location in ring */
index a03a248517edd7ce494393d4c7563e61074fa468..1220689bfea6e3479a54344cc8f52916619c9cd3 100644 (file)
@@ -137,11 +137,11 @@ explore_mtab(char *mtab, char *mntpoint)
        rtend = logend = NULL;
        fname = mnt->mnt_dir;
        datadev = mnt->mnt_fsname;
-       if (logdev = hasmntopt(mnt, "logdev=")) {
+       if ((logdev = hasmntopt(mnt, "logdev="))) {
                logdev += 7;
                logend = strtok(logdev, " ");
        }
-       if (rtdev = hasmntopt(mnt, "rtdev=")) {
+       if ((rtdev = hasmntopt(mnt, "rtdev="))) {
                rtdev += 6;
                rtend = strtok(rtdev, " ");
        }
index cba3bbab0ed1f832017bc23b26cf44dd90cda8cd..71f15cf8cbff4db4a5c5455d4ae17cfc920a6aad 100644 (file)
@@ -67,10 +67,9 @@ PKG_DOC_DIR = @pkg_doc_dir@
 # $(CXXFILES), or $(HFILES) and is used to construct the manifest list
 # during the "dist" phase (packaging).
 
-CFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -Wno-parentheses \
-       $(LCFLAGS) -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' \
-       -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \
-       -DXFS_BIG_FILES=1 -DXFS_BIG_FILESYSTEMS=1
+CFLAGS += $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall $(LCFLAGS) \
+       -I$(TOPDIR)/include '-DVERSION="$(PKG_VERSION)"' -D_GNU_SOURCE \
+       -D_FILE_OFFSET_BITS=64 -DXFS_BIG_FILES=1 -DXFS_BIG_FILESYSTEMS=1
 
 LDFLAGS = $(LLDFLAGS)
 LDLIBS = $(LLDLIBS) $(MALLOCLIB)
index 2b6ce6fe07b31fb8462a41b37e158c59a1cf9264..d9b3cd934c0f47dcd40bd471007dfeb0116f8c95 100644 (file)
@@ -1044,7 +1044,7 @@ void xfs_log_print(xlog_t       *log,
      * are printing the entire log.  However, if the start block is given,
      * we still end at the end of the logical log.
      */
-    if (error = xlog_print_find_oldest(log, &block_end)) {
+    if ((error = xlog_print_find_oldest(log, &block_end))) {
            fprintf(stderr, "%s: problem finding oldest LR\n", progname);
            return;
     }
index 8570d140d73133de80c90f195bba363ea533fe21..abe566763546f4cf276e662473e22d373b142220 100644 (file)
@@ -148,7 +148,7 @@ getstr(
        char    *rval;
 
        p = *pp;
-       while (c = *p) {
+       while ((c = *p)) {
                switch (c) {
                case ' ':
                case '\t':
@@ -296,7 +296,7 @@ newregfile(
                        progname, fname, strerror(errno));
                exit(1);
        }
-       if (*len = (int)size) {
+       if ((*len = (int)size)) {
                buf = malloc(size);
                if (read(fd, buf, size) < size) {
                        fprintf(stderr, "%s: read failed on %s: %s\n",
@@ -627,7 +627,7 @@ rtinit(
         * First, allocate the inodes.
         */
        tp = libxfs_trans_alloc(mp, 0);
-       if (i = libxfs_trans_reserve(tp, MKFS_BLOCKRES_INODE, 0, 0, 0, 0))
+       if ((i = libxfs_trans_reserve(tp, MKFS_BLOCKRES_INODE, 0, 0, 0, 0)))
                res_failed(i);
        bzero(&creds, sizeof(creds));
        error = libxfs_inode_alloc(&tp, mp->m_rootip, IFREG, 1,
@@ -664,8 +664,8 @@ rtinit(
         * Next, give the bitmap file some zero-filled blocks.
         */
        tp = libxfs_trans_alloc(mp, 0);
-       if (i = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
-                       (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1), 0, 0, 0, 0))
+       if ((i = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
+                       (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1), 0, 0, 0, 0)))
                res_failed(i);
        libxfs_trans_ijoin(tp, rbmip, 0);
        bno = 0;
@@ -697,9 +697,9 @@ rtinit(
         */
        tp = libxfs_trans_alloc(mp, 0);
        nsumblocks = mp->m_rsumsize >> mp->m_sb.sb_blocklog;
-       if (i = libxfs_trans_reserve(tp,
+       if ((i = libxfs_trans_reserve(tp,
                        nsumblocks + (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1),
-                       0, 0, 0, 0))
+                       0, 0, 0, 0)))
                res_failed(i);
        libxfs_trans_ijoin(tp, rsumip, 0);
        bno = 0;
@@ -731,7 +731,7 @@ rtinit(
         */
        for (bno = 0; bno < mp->m_sb.sb_rextents; bno = ebno) {
                tp = libxfs_trans_alloc(mp, 0);
-               if (i = libxfs_trans_reserve(tp, 0, 0, 0, 0, 0))
+               if ((i = libxfs_trans_reserve(tp, 0, 0, 0, 0, 0)))
                        res_failed(i);
                XFS_BMAP_INIT(&flist, &first);
                ebno = XFS_RTMIN(mp->m_sb.sb_rextents,
index b1934e1386d75d872543112d4e57fb3f0e769c25..28d3d8118867f4b9d93ce483860bec9c16db7527 100644 (file)
@@ -1078,7 +1078,7 @@ main(int argc, char **argv)
                usage();
        }
 
-       if (dsunit && !dswidth || !dsunit && dswidth) {
+       if ((dsunit && !dswidth) || (!dsunit && dswidth)) {
                fprintf(stderr,
 "both sunit and swidth options have to be specified\n");
                usage();
@@ -1479,16 +1479,17 @@ main(int argc, char **argv)
                         * Make sure that the log size is a multiple of the
                         * stripe unit
                         */
-                       if ((logblocks % dsunit) != 0) 
-                          if (!lsflag) 
+                       if ((logblocks % dsunit) != 0) {
+                           if (!lsflag) 
                                logblocks = ((logblocks + (dsunit - 1))
                                                        /dsunit) * dsunit;
-                          else {
+                           else {
                                fprintf(stderr,
        "internal log size %lld is not a multiple of the stripe unit %d\n", 
                                        (long long)logblocks, dsunit);
                                usage();
-                          }
+                           }
+                       }
 
                        if (logblocks > agsize-XFS_FSB_TO_AGBNO(mp,logstart)) {
                                fprintf(stderr,
@@ -1795,7 +1796,7 @@ main(int argc, char **argv)
                args.alignment = 1;
                args.minalignslop = UINT_MAX;
                args.pag = &mp->m_perag[agno];
-               if (i = libxfs_trans_reserve(tp, worst_freelist, 0, 0, 0, 0))
+               if ((i = libxfs_trans_reserve(tp, worst_freelist, 0, 0, 0, 0)))
                        res_failed(i);
                libxfs_alloc_fix_freelist(&args, 0);
                libxfs_trans_commit(tp, 0, NULL);
index d7025c292ed3fe8d2c2a5be1ef82e5b6bed4ab9e..a3f1758a1c291af3efca7fae13d8c1507d1be46a 100644 (file)
@@ -548,7 +548,7 @@ attach:
         *            /
         *           ?1
         */
-       while (back = forw->avl_forw)
+       while ((back = forw->avl_forw))
                forw = back;
 
        /*
index dbaf211dd54bb83c2b64006788df5a25d7b19c98..e165fdf75e621ac396504238600d96ff978cae17 100644 (file)
@@ -547,7 +547,7 @@ attach:
         *            /
         *           ?1
         */
-       while (back = forw->avl_forw)
+       while ((back = forw->avl_forw))
                forw = back;
 
        /*
index 90d2e9f93fadeb04f25775d215c068b4b2acda6b..a4ff448d8ceb82cdc20a55a5d21264865e5696fd 100644 (file)
@@ -637,10 +637,10 @@ process_inode_chunk(xfs_mount_t *mp, xfs_agnumber_t agno, int num_inos,
                         * chunk that they're in
                         */
                        if (verify_dinode(mp, dino, agno, agino) == 0 ||
-                                       agno == 0 &&
+                                       (agno == 0 &&
                                        (mp->m_sb.sb_rootino == agino ||
                                         mp->m_sb.sb_rsumino == agino ||
-                                        mp->m_sb.sb_rbmino == agino))
+                                        mp->m_sb.sb_rbmino == agino)))
                                status++;
 
                        irec_offset++;
index ee5a40154698abc5d14f318d68f6358cafb42739..7fd0d2c3cd1c18ab83028ab7c9aea056479b1b33 100644 (file)
@@ -1121,7 +1121,7 @@ verify_final_da_path(xfs_mount_t  *mp,
         * release/write buffer
         */
        ASSERT(cursor->level[this_level].dirty == 0 ||
-               cursor->level[this_level].dirty && !no_modify);
+               (cursor->level[this_level].dirty && !no_modify));
 
        if (cursor->level[this_level].dirty && !no_modify)
                libxfs_writebuf(cursor->level[this_level].bp, 0);
@@ -1301,7 +1301,7 @@ verify_da_path(xfs_mount_t        *mp,
                 * required.  don't write out the descendant level
                 */
                ASSERT(cursor->level[this_level].dirty == 0 ||
-                       cursor->level[this_level].dirty && !no_modify);
+                       (cursor->level[this_level].dirty && !no_modify));
 
                if (cursor->level[this_level].dirty && !no_modify)
                        libxfs_writebuf(cursor->level[this_level].bp, 0);
@@ -2356,7 +2356,7 @@ process_leaf_dir_block(
         * pointing to used bytes.  we're being conservative here
         * since the block will get compacted anyhow by the kernel.
         */
-       if (leaf->hdr.holes == 0 && first_used != INT_GET(leaf->hdr.firstused, ARCH_CONVERT) ||
+       if ((leaf->hdr.holes == 0 && first_used != INT_GET(leaf->hdr.firstused, ARCH_CONVERT)) ||
                        INT_GET(leaf->hdr.firstused, ARCH_CONVERT) > first_used)  {
                if (!no_modify)  {
                        if (verbose)
@@ -2709,7 +2709,7 @@ process_leaf_dir_level(xfs_mount_t        *mp,
 
                current_hashval = greatest_hashval;
 
-               ASSERT(buf_dirty == 0 || buf_dirty && !no_modify);
+               ASSERT(buf_dirty == 0 || (buf_dirty && !no_modify));
 
                if (buf_dirty && !no_modify)  {
                        *repair = 1;
@@ -2925,7 +2925,7 @@ process_leaf_dir(
                 * XXX - later, we should try and just lose
                 * the block without losing the entire directory
                 */
-               ASSERT(*dotdot == 0 || *dotdot == 1 && *parent != NULLFSINO);
+               ASSERT(*dotdot == 0 || (*dotdot == 1 && *parent != NULLFSINO));
                libxfs_putbuf(bp);
                return(1);
        }
@@ -2947,7 +2947,7 @@ process_leaf_dir(
                }
        }
 
-       ASSERT(buf_dirty == 0 || buf_dirty && !no_modify);
+       ASSERT(buf_dirty == 0 || (buf_dirty && !no_modify));
 
        if (buf_dirty && !no_modify)
                libxfs_writebuf(bp, 0);
index 4074800b165906cf666e60d75d5c705bbd3ce00b..91ce68ec4358b4755c4731ca47a3dfa1e56840ec 100644 (file)
@@ -503,7 +503,7 @@ verify_final_dir2_path(xfs_mount_t  *mp,
         * release/write buffer
         */
        ASSERT(cursor->level[this_level].dirty == 0 ||
-               cursor->level[this_level].dirty && !no_modify);
+               (cursor->level[this_level].dirty && !no_modify));
 
        if (cursor->level[this_level].dirty && !no_modify)
                da_bwrite(mp, cursor->level[this_level].bp);
@@ -677,7 +677,7 @@ verify_dir2_path(xfs_mount_t        *mp,
                 * required.  don't write out the descendant level
                 */
                ASSERT(cursor->level[this_level].dirty == 0 ||
-                       cursor->level[this_level].dirty && !no_modify);
+                       (cursor->level[this_level].dirty && !no_modify));
 
                if (cursor->level[this_level].dirty && !no_modify)
                        da_bwrite(mp, cursor->level[this_level].bp);
@@ -1832,7 +1832,7 @@ process_leaf_level_dir2(
                        }
                }
                current_hashval = greatest_hashval;
-               ASSERT(buf_dirty == 0 || buf_dirty && !no_modify);
+               ASSERT(buf_dirty == 0 || (buf_dirty && !no_modify));
                if (buf_dirty && !no_modify) {
                        *repair = 1;
                        da_bwrite(mp, bp);
@@ -2062,9 +2062,9 @@ process_dir2(
                need_root_dotdot = 1;
        }
        
-       ASSERT(ino != mp->m_sb.sb_rootino && ino != *parent ||
-               ino == mp->m_sb.sb_rootino &&
-                       (ino == *parent || need_root_dotdot == 1));
+       ASSERT((ino != mp->m_sb.sb_rootino && ino != *parent) ||
+               (ino == mp->m_sb.sb_rootino &&
+                       (ino == *parent || need_root_dotdot == 1)));
 
        return res;
 }
index 1d0aae4af09b81da6a3d28e3f7930873c067f324..a99ab0776d266ffdf2b83b576e4b203d0c9626f9 100644 (file)
@@ -64,7 +64,7 @@ dir_stack_init(dir_stack_t *stack)
 static void
 dir_stack_push(dir_stack_t *stack, dir_stack_elem_t *elem)
 {
-       ASSERT(stack->cnt > 0 || stack->cnt == 0 && stack->head == NULL);
+       ASSERT(stack->cnt > 0 || (stack->cnt == 0 && stack->head == NULL));
 
        elem->next = stack->head;
        stack->head = elem;
index e9f7af53d3ce195cbf846bf1d330af803b745501..c07916d6a4098a734fae9621b95288117cbfcd99 100644 (file)
@@ -149,7 +149,7 @@ process_agi_unlinked(xfs_mount_t *mp, xfs_agnumber_t agno)
        if (err)
                do_warn("error following ag %d unlinked list\n", agno);
 
-       ASSERT(agi_dirty == 0 || agi_dirty && !no_modify);
+       ASSERT(agi_dirty == 0 || (agi_dirty && !no_modify));
 
        if (agi_dirty && !no_modify)
                libxfs_writebuf(bp, 0);
index 3984430b3ee19f19c653dc97af4a9554ebf01a79..d665b0a0f86adfc59a0f4502a9db542412ba47ae 100644 (file)
@@ -169,7 +169,7 @@ lf_block_delete_orphanage(xfs_mount_t               *mp,
 
                                if (!use_rbuf)  {
                                        ASSERT(ino_dirty == 0 ||
-                                               ino_dirty && !no_modify);
+                                               (ino_dirty && !no_modify));
 
                                        if (ino_dirty && !no_modify)
                                                libxfs_writebuf(bp, 0);
@@ -261,7 +261,7 @@ longform_delete_orphanage(xfs_mount_t       *mp,
                res += lf_block_delete_orphanage(mp, ino, leaf, &dirty,
                                        rootino_bp, rbuf_dirty);
 
-               ASSERT(dirty == 0 || dirty && !no_modify);
+               ASSERT(dirty == 0 || (dirty && !no_modify));
 
                if (dirty && !no_modify)
                        libxfs_writebuf(bp, 0);
@@ -411,7 +411,7 @@ shortform_delete_orphanage(xfs_mount_t      *mp,
 
                                dirty = clear_dinode(mp, dino, lino);
 
-                               ASSERT(dirty == 0 || dirty && !no_modify);
+                               ASSERT(dirty == 0 || (dirty && !no_modify));
 
                                /*
                                 * if we read the lost+found inode in to
@@ -628,7 +628,7 @@ lf2_block_delete_orphanage(xfs_mount_t              *mp,
 
                                if (!use_rbuf) {
                                        ASSERT(ino_dirty == 0 ||
-                                               ino_dirty && !no_modify);
+                                               (ino_dirty && !no_modify));
 
                                        if (ino_dirty && !no_modify)
                                                libxfs_writebuf(bp, 0);
@@ -740,7 +740,7 @@ longform2_delete_orphanage(xfs_mount_t      *mp,
                res += lf2_block_delete_orphanage(mp, ino, data, &dirty,
                                        rootino_bp, rbuf_dirty);
 
-               ASSERT(dirty == 0 || dirty && !no_modify);
+               ASSERT(dirty == 0 || (dirty && !no_modify));
 
                if (dirty && !no_modify)
                        da_bwrite(mp, bp);
@@ -888,7 +888,7 @@ shortform2_delete_orphanage(xfs_mount_t     *mp,
 
                                dirty = clear_dinode(mp, dino, lino);
 
-                               ASSERT(dirty == 0 || dirty && !no_modify);
+                               ASSERT(dirty == 0 || (dirty && !no_modify));
 
                                /*
                                 * if we read the lost+found inode in to
@@ -1019,7 +1019,7 @@ delete_orphanage(xfs_mount_t *mp)
                else
                        res = shortform_delete_orphanage(mp, ino, dino, dbp,
                                &dirty);
-               ASSERT(res == 0 && dirty == 0 || res == 1 && dirty == 1);
+               ASSERT((res == 0 && dirty == 0) || (res == 1 && dirty == 1));
                break;
        default:
                break;
index 65d88e7111f7cc835790f6b13e0b414b1084a820..8a78cb174a59a0f3cbbc7e640496a5638f240aba 100644 (file)
@@ -344,7 +344,7 @@ mk_rbmino(xfs_mount_t *mp)
         */
        tp = libxfs_trans_alloc(mp, 0);
 
-       if (i = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0))
+       if ((i = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0)))
                res_failed(i);
 
        error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0, &ip);
@@ -384,8 +384,8 @@ mk_rbmino(xfs_mount_t *mp)
         * from mkfs)
         */
        tp = libxfs_trans_alloc(mp, 0);
-       if (error = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
-                       (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1), 0, 0, 0, 0))
+       if ((error = libxfs_trans_reserve(tp, mp->m_sb.sb_rbmblocks +
+                       (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1), 0, 0, 0, 0)))
                res_failed(error);
 
        libxfs_trans_ijoin(tp, ip, 0);
@@ -435,7 +435,7 @@ fill_rbmino(xfs_mount_t *mp)
 
        tp = libxfs_trans_alloc(mp, 0);
 
-       if (error = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0))
+       if ((error = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0)))
                res_failed(error);
 
        error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rbmino, 0, &ip);
@@ -504,7 +504,7 @@ fill_rsumino(xfs_mount_t *mp)
 
        tp = libxfs_trans_alloc(mp, 0);
 
-       if (error = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0))
+       if ((error = libxfs_trans_reserve(tp, 10, 0, 0, 0, 0)))
                res_failed(error);
 
        error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rsumino, 0, &ip);
@@ -574,8 +574,8 @@ mk_rsumino(xfs_mount_t *mp)
         */
        tp = libxfs_trans_alloc(mp, 0);
 
-       if (i = libxfs_trans_reserve(tp, 10, XFS_ICHANGE_LOG_RES(mp), 0,
-                               XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT))
+       if ((i = libxfs_trans_reserve(tp, 10, XFS_ICHANGE_LOG_RES(mp), 0,
+                               XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT)))
                res_failed(i);
 
        error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rsumino, 0, &ip);
@@ -618,11 +618,11 @@ mk_rsumino(xfs_mount_t *mp)
        XFS_BMAP_INIT(&flist, &first);
 
        nsumblocks = mp->m_rsumsize >> mp->m_sb.sb_blocklog;
-       if (error = libxfs_trans_reserve(tp,
+       if ((error = libxfs_trans_reserve(tp,
                                  mp->m_sb.sb_rbmblocks +
                                      (XFS_BM_MAXLEVELS(mp, XFS_DATA_FORK) - 1),
                                  BBTOB(128), 0, XFS_TRANS_PERM_LOG_RES,
-                                 XFS_DEFAULT_PERM_LOG_COUNT))
+                                 XFS_DEFAULT_PERM_LOG_COUNT)))
                res_failed(error);
 
        libxfs_trans_ijoin(tp, ip, 0);
@@ -671,8 +671,8 @@ mk_root_dir(xfs_mount_t *mp)
        tp = libxfs_trans_alloc(mp, 0);
        ip = NULL;
 
-       if (i = libxfs_trans_reserve(tp, 10, XFS_ICHANGE_LOG_RES(mp), 0,
-                               XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT))
+       if ((i = libxfs_trans_reserve(tp, 10, XFS_ICHANGE_LOG_RES(mp), 0,
+                               XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT)))
                res_failed(i);
 
        error = libxfs_trans_iget(mp, tp, mp->m_sb.sb_rootino, 0, &ip);
@@ -736,15 +736,15 @@ mk_orphanage(xfs_mount_t *mp)
        XFS_BMAP_INIT(&flist, &first);
 
        nres = XFS_MKDIR_SPACE_RES(mp, strlen(ORPHANAGE));
-       if (i = libxfs_trans_reserve(tp, nres, XFS_MKDIR_LOG_RES(mp), 0,
-                               XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT))
+       if ((i = libxfs_trans_reserve(tp, nres, XFS_MKDIR_LOG_RES(mp), 0,
+                               XFS_TRANS_PERM_LOG_RES, XFS_MKDIR_LOG_COUNT)))
                res_failed(i);
 
        /*
         * use iget/ijoin instead of trans_iget because the ialloc
         * wrapper can commit the transaction and start a new one
         */
-       if (i = libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip, 0))
+       if ((i = libxfs_iget(mp, NULL, mp->m_sb.sb_rootino, 0, &pip, 0)))
                do_error("%d - couldn't iget root inode to make %s\n",
                        i, ORPHANAGE);
 
@@ -769,8 +769,8 @@ mk_orphanage(xfs_mount_t *mp)
        /*
         * create the actual entry
         */
-       if (error = dir_createname(mp, tp, pip, ORPHANAGE,
-                       strlen(ORPHANAGE), ip->i_ino, &first, &flist, nres)) {
+       if ((error = dir_createname(mp, tp, pip, ORPHANAGE,
+                       strlen(ORPHANAGE), ip->i_ino, &first, &flist, nres))) {
                do_warn("can't make %s, createname error %d, will try later\n",
                        ORPHANAGE, error);
                orphanage_entered = 0;
@@ -825,25 +825,25 @@ mv_orphanage(xfs_mount_t  *mp,
 
        sprintf(fname, "%llu", (unsigned long long)ino);
 
-       if (err = libxfs_iget(mp, NULL, dir_ino, 0, &dir_ino_p, 0))
+       if ((err = libxfs_iget(mp, NULL, dir_ino, 0, &dir_ino_p, 0)))
                do_error("%d - couldn't iget orphanage inode\n", err);
 
        tp = libxfs_trans_alloc(mp, 0);
 
-       if (err = libxfs_iget(mp, NULL, ino, 0, &ino_p, 0))
+       if ((err = libxfs_iget(mp, NULL, ino, 0, &ino_p, 0)))
                do_error("%d - couldn't iget disconnected inode\n", err);
 
        if (isa_dir)  {
                nres = XFS_DIRENTER_SPACE_RES(mp, strlen(fname)) +
                       XFS_DIRENTER_SPACE_RES(mp, 2);
-               if (err = dir_lookup(mp, tp, ino_p, "..", 2,
-                               &entry_ino_num))  {
+               if ((err = dir_lookup(mp, tp, ino_p, "..", 2,
+                               &entry_ino_num))) {
                        ASSERT(err == ENOENT);
 
-                       if (err = libxfs_trans_reserve(tp, nres,
+                       if ((err = libxfs_trans_reserve(tp, nres,
                                        XFS_RENAME_LOG_RES(mp), 0,
                                        XFS_TRANS_PERM_LOG_RES,
-                                       XFS_RENAME_LOG_COUNT))
+                                       XFS_RENAME_LOG_COUNT)))
                                do_error(
                "space reservation failed (%d), filesystem may be out of space\n",
                                        err);
@@ -852,9 +852,9 @@ mv_orphanage(xfs_mount_t    *mp,
                        libxfs_trans_ijoin(tp, ino_p, 0);
 
                        XFS_BMAP_INIT(&flist, &first);
-                       if (err = dir_createname(mp, tp, dir_ino_p, fname,
+                       if ((err = dir_createname(mp, tp, dir_ino_p, fname,
                                                strlen(fname), ino, &first,
-                                               &flist, nres))
+                                               &flist, nres)))
                                do_error(
        "name create failed in %s (%d), filesystem may be out of space\n",
                                        ORPHANAGE, err);
@@ -862,8 +862,8 @@ mv_orphanage(xfs_mount_t    *mp,
                        dir_ino_p->i_d.di_nlink++;
                        libxfs_trans_log_inode(tp, dir_ino_p, XFS_ILOG_CORE);
 
-                       if (err = dir_createname(mp, tp, ino_p, "..", 2,
-                                               dir_ino, &first, &flist, nres))
+                       if ((err = dir_createname(mp, tp, ino_p, "..", 2,
+                                               dir_ino, &first, &flist, nres)))
                                do_error(
        "creation of .. entry failed (%d), filesystem may be out of space\n",
                                        err);
@@ -871,7 +871,7 @@ mv_orphanage(xfs_mount_t    *mp,
                        ino_p->i_d.di_nlink++;
                        libxfs_trans_log_inode(tp, ino_p, XFS_ILOG_CORE);
 
-                       if (err = libxfs_bmap_finish(&tp, &flist, first, &committed))
+                       if ((err = libxfs_bmap_finish(&tp, &flist, first, &committed)))
                                do_error(
        "bmap finish failed (err - %d), filesystem may be out of space\n",
                                        err);
@@ -879,10 +879,10 @@ mv_orphanage(xfs_mount_t  *mp,
                        libxfs_trans_commit(tp,
                                XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_SYNC, 0);
                } else  {
-                       if (err = libxfs_trans_reserve(tp, nres,
+                       if ((err = libxfs_trans_reserve(tp, nres,
                                        XFS_RENAME_LOG_RES(mp), 0,
                                        XFS_TRANS_PERM_LOG_RES,
-                                       XFS_RENAME_LOG_COUNT))
+                                       XFS_RENAME_LOG_COUNT)))
                                do_error(
        "space reservation failed (%d), filesystem may be out of space\n",
                                        err);
@@ -892,9 +892,9 @@ mv_orphanage(xfs_mount_t    *mp,
 
                        XFS_BMAP_INIT(&flist, &first);
 
-                       if (err = dir_createname(mp, tp, dir_ino_p, fname,
+                       if ((err = dir_createname(mp, tp, dir_ino_p, fname,
                                                strlen(fname), ino, &first,
-                                               &flist, nres))
+                                               &flist, nres)))
                                do_error(
        "name create failed in %s (%d), filesystem may be out of space\n",
                                        ORPHANAGE, err);
@@ -907,16 +907,16 @@ mv_orphanage(xfs_mount_t  *mp,
                         * to us.  that'll pop a libxfs/kernel ASSERT.
                         */
                        if (entry_ino_num != dir_ino)  {
-                               if (err = dir_replace(mp, tp, ino_p, "..",
+                               if ((err = dir_replace(mp, tp, ino_p, "..",
                                                        2, dir_ino, &first,
-                                                       &flist, nres))
+                                                       &flist, nres)))
                                        do_error(
                "name replace op failed (%d), filesystem may be out of space\n",
                                                err);
                        }
 
-                       if (err = libxfs_bmap_finish(&tp, &flist, first,
-                                                       &committed))
+                       if ((err = libxfs_bmap_finish(&tp, &flist, first,
+                                                       &committed)))
                                do_error(
                "bmap finish failed (%d), filesystem may be out of space\n",
                                        err);
@@ -932,8 +932,8 @@ mv_orphanage(xfs_mount_t    *mp,
                 * also accounted for in the create
                 */
                nres = XFS_DIRENTER_SPACE_RES(mp, strlen(fname));
-               if (err = libxfs_trans_reserve(tp, nres, XFS_REMOVE_LOG_RES(mp), 0,
-                               XFS_TRANS_PERM_LOG_RES, XFS_REMOVE_LOG_COUNT))
+               if ((err = libxfs_trans_reserve(tp, nres, XFS_REMOVE_LOG_RES(mp), 0,
+                               XFS_TRANS_PERM_LOG_RES, XFS_REMOVE_LOG_COUNT)))
                        do_error(
        "space reservation failed (%d), filesystem may be out of space\n",
                                err);
@@ -942,8 +942,8 @@ mv_orphanage(xfs_mount_t    *mp,
                libxfs_trans_ijoin(tp, ino_p, 0);
 
                XFS_BMAP_INIT(&flist, &first);
-               if (err = dir_createname(mp, tp, dir_ino_p, fname,
-                               strlen(fname), ino, &first, &flist, nres))
+               if ((err = dir_createname(mp, tp, dir_ino_p, fname,
+                               strlen(fname), ino, &first, &flist, nres)))
                        do_error(
        "name create failed in %s (%d), filesystem may be out of space\n",
                                ORPHANAGE, err);
@@ -952,7 +952,7 @@ mv_orphanage(xfs_mount_t    *mp,
                ino_p->i_d.di_nlink = 1;
                libxfs_trans_log_inode(tp, ino_p, XFS_ILOG_CORE);
 
-               if (err = libxfs_bmap_finish(&tp, &flist, first, &committed))
+               if ((err = libxfs_bmap_finish(&tp, &flist, first, &committed)))
                        do_error(
                "bmap finish failed (%d), filesystem may be out of space\n",
                                err);
@@ -1589,7 +1589,7 @@ longform_dir_entry_check(xfs_mount_t      *mp,
                                                num_illegal, need_dot, stack,
                                                irec, ino_offset);
 
-               ASSERT(dirty == 0 || dirty && !no_modify);
+               ASSERT(dirty == 0 || (dirty && !no_modify));
 
                if (dirty && !no_modify)
                        libxfs_writebuf(bp, 0);
@@ -2774,8 +2774,8 @@ shortform_dir_entry_check(xfs_mount_t     *mp,
                 * with bogus inode numbers if we're in no modify mode.
                 */
 
-               if (lino == orphanage_ino && strcmp(fname, ORPHANAGE) == 0
-                               || no_modify && verify_inum(mp, lino))  {
+               if ((lino == orphanage_ino && strcmp(fname, ORPHANAGE) == 0)
+                               || (no_modify && verify_inum(mp, lino))) {
                        next_sfe = (xfs_dir_sf_entry_t *)
                                ((__psint_t) sf_entry +
                                XFS_DIR_SF_ENTSIZE_BYENTRY(sf_entry));
@@ -3155,8 +3155,8 @@ shortform_dir2_entry_check(xfs_mount_t    *mp,
                 * with bogus inode numbers if we're in no modify mode.
                 */
 
-               if (lino == orphanage_ino && strcmp(fname, ORPHANAGE) == 0
-                               || no_modify && verify_inum(mp, lino))  {
+               if ((lino == orphanage_ino && strcmp(fname, ORPHANAGE) == 0)
+                               || (no_modify && verify_inum(mp, lino))) {
                        next_sfep = (xfs_dir2_sf_entry_t *)
                                ((__psint_t) sfep +
                                XFS_DIR2_SF_ENTSIZE_BYENTRY(sfp, sfep));
@@ -3374,7 +3374,7 @@ process_dirstack(xfs_mount_t *mp, dir_stack_t *stack)
 
                ASSERT(!is_inode_refchecked(ino, irec, ino_offset));
 
-               if (error = libxfs_iget(mp, NULL, ino, 0, &ip, 0))  {
+               if ((error = libxfs_iget(mp, NULL, ino, 0, &ip, 0))) {
                        if (!no_modify)
                                do_error("couldn't map inode %llu, err = %d\n",
                                        ino, error);
@@ -3483,7 +3483,7 @@ process_dirstack(xfs_mount_t *mp, dir_stack_t *stack)
                                                        stack, irec,
                                                        ino_offset);
 
-                       ASSERT(dirty == 0 || dirty && !no_modify);
+                       ASSERT(dirty == 0 || (dirty && !no_modify));
                        if (dirty)  {
                                libxfs_trans_log_inode(tp, ip,
                                        XFS_ILOG_CORE | XFS_ILOG_DDATA);
@@ -3514,10 +3514,10 @@ process_dirstack(xfs_mount_t *mp, dir_stack_t *stack)
                        libxfs_trans_ijoin(tp, ip, 0);
                        libxfs_trans_ihold(tp, ip);
                        XFS_BMAP_INIT(&flist, &first);
-                       if (error = dir_createname(mp, tp, ip, ORPHANAGE,
+                       if ((error = dir_createname(mp, tp, ip, ORPHANAGE,
                                                strlen(ORPHANAGE),
                                                orphanage_ino, &first, &flist,
-                                               nres))
+                                               nres)))
                                do_error("can't make %s entry in root inode "
                                         "%llu, createname error %d\n",
                                        ORPHANAGE, ino, error);
@@ -3563,8 +3563,8 @@ process_dirstack(xfs_mount_t *mp, dir_stack_t *stack)
 
                        XFS_BMAP_INIT(&flist, &first);
 
-                       if (error = dir_createname(mp, tp, ip, "..", 2,
-                                       ip->i_ino, &first, &flist, nres))
+                       if ((error = dir_createname(mp, tp, ip, "..", 2,
+                                       ip->i_ino, &first, &flist, nres)))
                                do_error(
 "can't make \"..\" entry in root inode %llu, createname error %d\n",
                                        ino, error);
@@ -3686,9 +3686,9 @@ process_dirstack(xfs_mount_t *mp, dir_stack_t *stack)
 
                                XFS_BMAP_INIT(&flist, &first);
 
-                               if (error = dir_createname(mp, tp, ip, ".",
+                               if ((error = dir_createname(mp, tp, ip, ".",
                                                1, ip->i_ino, &first, &flist,
-                                               nres))
+                                               nres)))
                                        do_error(
        "can't make \".\" entry in dir ino %llu, createname error %d\n",
                                                ino, error);
index f4a072e931aecbcd2986d3651a9dd66587050f8f..2b2d6524d8f473aac7c019842c02df6e5c2b9247 100644 (file)
@@ -386,8 +386,8 @@ verify_sb(xfs_sb_t *sb, int is_primary_sb)
                 * return errors if shared vn or alignment fields
                 * are set without their feature bits being set
                 */
-               if (!pre_65_beta && sb->sb_versionnum & XR_PART_SECSB_VNMASK ||
-                   pre_65_beta && sb->sb_versionnum & XR_ALPHA_SECSB_VNMASK)  {
+               if ((!pre_65_beta && (sb->sb_versionnum & XR_PART_SECSB_VNMASK)) ||
+                   (pre_65_beta && (sb->sb_versionnum & XR_ALPHA_SECSB_VNMASK))) {
                        /*
                         * shared version # and inode alignment fields
                         * should be valid
@@ -625,12 +625,12 @@ get_sb_geometry(fs_geometry_t *geo, xfs_sb_t *sbp)
        /*
         * inode alignment field lives before the data alignment field
         */
-       if (!pre_65_beta && sbp->sb_versionnum & XR_PART_SECSB_VNMASK ||
-           pre_65_beta && sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK)
+       if ((!pre_65_beta && (sbp->sb_versionnum & XR_PART_SECSB_VNMASK)) ||
+           (pre_65_beta && (sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK)))
                geo->sb_inoalignmt = sbp->sb_inoalignmt;
 
-       if (!pre_65_beta && sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK ||
-           pre_65_beta && XFS_SB_VERSION_HASDALIGN(sbp))  {
+       if ((!pre_65_beta && (sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK)) ||
+           (pre_65_beta && XFS_SB_VERSION_HASDALIGN(sbp))) {
                geo->sb_unit = sbp->sb_unit;
                geo->sb_width = sbp->sb_width;
        }
@@ -649,8 +649,8 @@ get_sb_geometry(fs_geometry_t *geo, xfs_sb_t *sbp)
         * from the features enabled in this superblock whether
         * or not the sector was bzero'd at mkfs time.
         */
-       if (!pre_65_beta && sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK ||
-           pre_65_beta && sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK)  {
+       if ((!pre_65_beta && (sbp->sb_versionnum & XR_GOOD_SECSB_VNMASK)) ||
+           (pre_65_beta && (sbp->sb_versionnum & XR_ALPHA_SECSB_VNMASK))) {
                geo->sb_fully_zeroed = 1;
        }
 }
index e6228a230304f87787249117b692f56963e1b727..1fa00c3d36b1fcd0f250cdad2e1ec28ae879bee2 100644 (file)
@@ -132,7 +132,7 @@ scan_lbtree(
                        type, whichfork, root, ino, tot, nex, blkmapp,
                        bm_cursor, isroot, check_dups, &dirty);
 
-       ASSERT(dirty == 0 || dirty && !no_modify);
+       ASSERT(dirty == 0 || (dirty && !no_modify));
 
        if (dirty && !no_modify)
                libxfs_writebuf(bp, 0);
@@ -315,7 +315,7 @@ scanfunc_bmap(
        (*tot)++;
        if (level == 0) {
                if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_bmap_dmxr[0] ||
-                   isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[0])  {
+                   (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[0])) {
 do_warn("inode 0x%llx bad # of bmap records (%u, min - %u, max - %u)\n",
                                ino, INT_GET(block->bb_numrecs, ARCH_CONVERT),
                                mp->m_bmap_dmnr[0], mp->m_bmap_dmxr[0]);
@@ -366,7 +366,7 @@ do_warn("inode 0x%llx bad # of bmap records (%u, min - %u, max - %u)\n",
                                                type, ino, tot, whichfork));
        }
        if (INT_GET(block->bb_numrecs, ARCH_CONVERT) > mp->m_bmap_dmxr[1] ||
-           isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[1])  {
+           (isroot == 0 && INT_GET(block->bb_numrecs, ARCH_CONVERT) < mp->m_bmap_dmnr[1])) {
 do_warn("inode 0x%llx bad # of bmap records (%u, min - %u, max - %u)\n",
                        ino, INT_GET(block->bb_numrecs, ARCH_CONVERT),
                        mp->m_bmap_dmnr[1], mp->m_bmap_dmxr[1]);
@@ -1253,21 +1253,21 @@ scan_ag(
                do_warn("bad agbno %u for inobt root, agno %d\n",
                        INT_GET(agi->agi_root, ARCH_CONVERT), agno);
 
-       ASSERT(agi_dirty == 0 || agi_dirty && !no_modify);
+       ASSERT(agi_dirty == 0 || (agi_dirty && !no_modify));
 
        if (agi_dirty && !no_modify)
                libxfs_writebuf(agibuf, 0);
        else
                libxfs_putbuf(agibuf);
 
-       ASSERT(agf_dirty == 0 || agf_dirty && !no_modify);
+       ASSERT(agf_dirty == 0 || (agf_dirty && !no_modify));
 
        if (agf_dirty && !no_modify)
                libxfs_writebuf(agfbuf, 0);
        else
                libxfs_putbuf(agfbuf);
 
-       ASSERT(sb_dirty == 0 || sb_dirty && !no_modify);
+       ASSERT(sb_dirty == 0 || (sb_dirty && !no_modify));
 
        if (sb_dirty && !no_modify) {
                libxfs_xlate_sb(XFS_BUF_PTR(sbbuf), sb, -1, ARCH_CONVERT,