]> granicus.if.org Git - zfs/commitdiff
Resolve additional cases where gcc wants extra parenthesis.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 11 Mar 2009 20:57:47 +0000 (13:57 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 11 Mar 2009 20:57:47 +0000 (13:57 -0700)
These were introduced by the rebase to b108.

12 files changed:
cmd/zfs/zfs_main.c
cmd/zpool/zpool_iter.c
lib/libzfs/libzfs_dataset.c
module/unicode/u8_textprep.c
module/zfs/dnode.c
module/zfs/dnode_sync.c
module/zfs/dsl_dataset.c
module/zfs/dsl_pool.c
module/zfs/spa.c
module/zfs/zfs_fuid.c
module/zfs/zfs_ioctl.c
module/zfs/zio.c

index 1f7f47d08a64791e14ace9df5199d5e1f6f660d7..e05691503ee3f5030a32933601a1c38ea47c08bc 100644 (file)
@@ -645,7 +645,7 @@ zfs_do_create(int argc, char **argv)
                zfs_prop_t resv_prop;
                char *strval;
 
-               if (p = strchr(argv[0], '/'))
+               if ((p = strchr(argv[0], '/')))
                        *p = '\0';
                zpool_handle = zpool_open(g_zfs, argv[0]);
                if (p != NULL)
index 2f0daefd5572da032b00d99791f63f896cf5c2d4..37cc4680106d0e5e45130ce01665dfae97914a40 100644 (file)
@@ -131,7 +131,7 @@ pool_list_get(int argc, char **argv, zprop_list_t **proplist, int *err)
                for (i = 0; i < argc; i++) {
                        zpool_handle_t *zhp;
 
-                       if (zhp = zpool_open_canfail(g_zfs, argv[i])) {
+                       if ((zhp = zpool_open_canfail(g_zfs, argv[i]))) {
                                if (add_pool(zhp, zlp) != 0)
                                        *err = B_TRUE;
                        } else {
index 6385a47b77ed9f741d047cb2db5ff60246a5edd2..c07930c01d8c8c054b33b613a6e1635501681f47 100644 (file)
@@ -632,7 +632,7 @@ libzfs_mnttab_fini(libzfs_handle_t *hdl)
        void *cookie = NULL;
        mnttab_node_t *mtn;
 
-       while (mtn = avl_destroy_nodes(&hdl->libzfs_mnttab_cache, &cookie)) {
+       while ((mtn = avl_destroy_nodes(&hdl->libzfs_mnttab_cache, &cookie))) {
                free(mtn->mtn_mt.mnt_special);
                free(mtn->mtn_mt.mnt_mountp);
                free(mtn->mtn_mt.mnt_fstype);
@@ -684,7 +684,7 @@ libzfs_mnttab_remove(libzfs_handle_t *hdl, const char *fsname)
        mnttab_node_t *ret;
 
        find.mtn_mt.mnt_special = (char *)fsname;
-       if (ret = avl_find(&hdl->libzfs_mnttab_cache, (void *)&find, NULL)) {
+       if ((ret = avl_find(&hdl->libzfs_mnttab_cache, (void *)&find, NULL))) {
                avl_remove(&hdl->libzfs_mnttab_cache, ret);
                free(ret->mtn_mt.mnt_special);
                free(ret->mtn_mt.mnt_mountp);
index 8faf1a97e47eb03e087f6c5c47f570e42949b43d..635f00d44207f508fd04b68fb2326899f856dd5c 100644 (file)
 #define        U8_16BIT_TABLE_INDICATOR        (0x8000U)
 
 /* The following are some convenience macros. */
-#define        U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3) \
-       (u) = ((uint32_t)(b1) & 0x0F) << 12 | ((uint32_t)(b2) & 0x3F) << 6 | \
-               (uint32_t)(b3) & 0x3F;
+#define        U8_PUT_3BYTES_INTO_UTF32(u, b1, b2, b3)  \
+       (u) = ((((uint32_t)(b1) & 0x0F) << 12) | \
+              (((uint32_t)(b2) & 0x3F) << 6)  | \
+               ((uint32_t)(b3) & 0x3F));
 
 #define        U8_SIMPLE_SWAP(a, b, t) \
        (t) = (a); \
index e3d576d1eef0a82d25f647e759da057f106512fb..601c46d2c364a3cd0d7729a77275686d4b45479c 100644 (file)
@@ -1106,7 +1106,7 @@ dnode_free_range(dnode_t *dn, uint64_t off, uint64_t len, dmu_tx_t *tx)
                int shift = epbs + dn->dn_datablkshift;
 
                first = blkid >> epbs;
-               if (db = dbuf_hold_level(dn, 1, first, FTAG)) {
+               if ((db = dbuf_hold_level(dn, 1, first, FTAG))) {
                        dbuf_will_dirty(db, tx);
                        dbuf_rele(db, FTAG);
                }
index f46239af952d00be5d850d259ca8f3476e2d336c..b47034dc976e83563b5257f726a2530454e7dcaf 100644 (file)
@@ -581,7 +581,7 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
        mutex_exit(&dn->dn_mtx);
 
        /* process all the "freed" ranges in the file */
-       while (rp = avl_last(&dn->dn_ranges[txgoff])) {
+       while ((rp = avl_last(&dn->dn_ranges[txgoff]))) {
                dnode_sync_free_range(dn, rp->fr_blkid, rp->fr_nblks, tx);
                /* grab the mutex so we don't race with dnode_block_freed() */
                mutex_enter(&dn->dn_mtx);
index a68b12d339e1691a81fa7ba6f31a23e20c5e78b9..0f904784ad26ffd807f5dfe3f723e4465fefd46c 100644 (file)
@@ -2333,8 +2333,8 @@ dsl_dataset_promote_check(void *arg1, void *arg2, dmu_tx_t *tx)
                if (ds->ds_phys->ds_prev_snap_obj == 0)
                        continue;
 
-               if (err = bplist_space(&ds->ds_deadlist,
-                   &dlused, &dlcomp, &dluncomp))
+               if ((err = bplist_space(&ds->ds_deadlist,
+                   &dlused, &dlcomp, &dluncomp)))
                        return (err);
                pa->used += dlused;
                pa->comp += dlcomp;
index 722662e621f16a5273a7fb8f88fb015e67277604..3457bafeaa64cb76625610e0891c33ce1379f8ef 100644 (file)
@@ -312,12 +312,12 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t txg)
        ASSERT(err == 0);
        DTRACE_PROBE(pool_sync__2rootzio);
 
-       while (dstg = txg_list_remove(&dp->dp_sync_tasks, txg))
+       while ((dstg = txg_list_remove(&dp->dp_sync_tasks, txg)))
                dsl_sync_task_group_sync(dstg, tx);
        DTRACE_PROBE(pool_sync__3task);
 
        start = gethrtime();
-       while (dd = txg_list_remove(&dp->dp_dirty_dirs, txg))
+       while ((dd = txg_list_remove(&dp->dp_dirty_dirs, txg)))
                dsl_dir_sync(dd, tx);
        write_time += gethrtime() - start;
 
index 8bcb1c216c7779b77f138e5d3b0dba9d20ef5fc0..8182eae4bd98f1826077189bfbf139489f4e7da4 100644 (file)
@@ -215,8 +215,8 @@ spa_prop_get(spa_t *spa, nvlist_t **nvp)
 
                                dp = spa_get_dsl(spa);
                                rw_enter(&dp->dp_config_rwlock, RW_READER);
-                               if (err = dsl_dataset_hold_obj(dp,
-                                   za.za_first_integer, FTAG, &ds)) {
+                               if ((err = dsl_dataset_hold_obj(dp,
+                                   za.za_first_integer, FTAG, &ds))) {
                                        rw_exit(&dp->dp_config_rwlock);
                                        break;
                                }
@@ -336,8 +336,8 @@ spa_prop_validate(spa_t *spa, nvlist_t *props)
                                        break;
                                }
 
-                               if (error = dmu_objset_open(strval, DMU_OST_ZFS,
-                                   DS_MODE_USER | DS_MODE_READONLY, &os))
+                               if ((error = dmu_objset_open(strval,DMU_OST_ZFS,
+                                   DS_MODE_USER | DS_MODE_READONLY, &os)))
                                        break;
 
                                /* We don't support gzip bootable datasets */
@@ -2362,7 +2362,7 @@ spa_check_rootconf(char *devpath, char *devid, nvlist_t **bestconf,
        uint64_t txg;
        int error;
 
-       if (error = vdev_disk_read_rootlabel(devpath, devid, &config))
+       if ((error = vdev_disk_read_rootlabel(devpath, devid, &config)))
                return (error);
 
        VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) == 0);
@@ -2408,7 +2408,7 @@ spa_get_rootconf(char *devpath, char *devid, nvlist_t **bestconf)
 
        if (devpath && ((tmp = strchr(devpath, ' ')) != NULL))
                *tmp = '\0';
-       if (error = spa_check_rootconf(devpath, devid, &conf, &txg)) {
+       if ((error = spa_check_rootconf(devpath, devid, &conf, &txg))) {
                cmn_err(CE_NOTE, "error reading device label");
                return (error);
        }
@@ -2492,7 +2492,7 @@ spa_import_rootpool(char *devpath, char *devid)
         * Get the vdev pathname and configuation from the most
         * recently updated vdev (highest txg).
         */
-       if (error = spa_get_rootconf(devpath, devid, &conf))
+       if ((error = spa_get_rootconf(devpath, devid, &conf)))
                goto msg_out;
 
        /*
index 286dafba80d12ae58e4a5226cc4b9272aaff2da4..ce2bc930300e43d472853601c8afd245c5186d01 100644 (file)
@@ -161,12 +161,12 @@ zfs_fuid_table_destroy(avl_tree_t *idx_tree, avl_tree_t *domain_tree)
        void *cookie;
 
        cookie = NULL;
-       while (domnode = avl_destroy_nodes(domain_tree, &cookie))
+       while ((domnode = avl_destroy_nodes(domain_tree, &cookie)))
                ksiddomain_rele(domnode->f_ksid);
 
        avl_destroy(domain_tree);
        cookie = NULL;
-       while (domnode = avl_destroy_nodes(idx_tree, &cookie))
+       while ((domnode = avl_destroy_nodes(idx_tree, &cookie)))
                kmem_free(domnode, sizeof (fuid_domain_t));
        avl_destroy(idx_tree);
 }
index d032648b54ebdb1850b4cb3cc5e4a7dc53aa12a4..e7c5ddc2603473cca345b3194e976b6a512f76e7 100644 (file)
@@ -748,8 +748,8 @@ zfs_ioc_pool_create(zfs_cmd_t *zc)
        nvlist_t *zplprops = NULL;
        char *buf;
 
-       if (error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
-           &config))
+       if ((error = get_nvlist(zc->zc_nvlist_conf,
+                               zc->zc_nvlist_conf_size, &config)))
                return (error);
 
        if (zc->zc_nvlist_src_size != 0 && (error =
@@ -1020,7 +1020,7 @@ zfs_ioc_dsobj_to_dsname(zfs_cmd_t *zc)
 {
        int error;
 
-       if (error = dsl_dsobj_to_dsname(zc->zc_name, zc->zc_obj, zc->zc_value))
+       if ((error = dsl_dsobj_to_dsname(zc->zc_name,zc->zc_obj,zc->zc_value)))
                return (error);
 
        return (0);
@@ -1203,8 +1203,8 @@ zfs_ioc_objset_stats(zfs_cmd_t *zc)
        int error;
        nvlist_t *nv;
 
-       if (error = dmu_objset_open(zc->zc_name,
-           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os))
+       if ((error = dmu_objset_open(zc->zc_name,
+           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os)))
                return (error);
 
        dmu_objset_fast_stat(os, &zc->zc_objset_stats);
@@ -1261,8 +1261,8 @@ zfs_ioc_objset_zplprops(zfs_cmd_t *zc)
        objset_t *os;
        int err;
 
-       if (err = dmu_objset_open(zc->zc_name,
-           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os))
+       if ((err = dmu_objset_open(zc->zc_name,
+           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os)))
                return (err);
 
        dmu_objset_fast_stat(os, &zc->zc_objset_stats);
@@ -1310,8 +1310,8 @@ zfs_ioc_dataset_list_next(zfs_cmd_t *zc)
        int error;
        char *p;
 
-       if (error = dmu_objset_open(zc->zc_name,
-           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os)) {
+       if ((error = dmu_objset_open(zc->zc_name,
+           DMU_OST_ANY, DS_MODE_USER | DS_MODE_READONLY, &os))) {
                if (error == ENOENT)
                        error = ESRCH;
                return (error);
@@ -1425,8 +1425,8 @@ zfs_set_prop_nvlist(const char *name, nvlist_t *nvl)
                            nvpair_type(elem) != DATA_TYPE_STRING)
                                return (EINVAL);
 
-                       if (error = zfs_secpolicy_write_perms(name,
-                           ZFS_DELEG_PERM_USERPROP, CRED()))
+                       if ((error = zfs_secpolicy_write_perms(name,
+                           ZFS_DELEG_PERM_USERPROP, CRED())))
                                return (error);
                        continue;
                }
index a669ad64a032966b417903e678a652f8e3e13f4e..124dcae8618e57e43479926a45f7755d4d3c2572 100644 (file)
@@ -2194,11 +2194,12 @@ zio_done(zio_t *zio)
                 */
                ASSERT(vd == NULL && bp != NULL);
 
-               if (IO_IS_ALLOCATING(zio))
+               if (IO_IS_ALLOCATING(zio)) {
                        if (zio->io_error != ENOSPC)
                                zio->io_reexecute |= ZIO_REEXECUTE_NOW;
                        else
                                zio->io_reexecute |= ZIO_REEXECUTE_SUSPEND;
+               }
 
                if ((zio->io_type == ZIO_TYPE_READ ||
                    zio->io_type == ZIO_TYPE_FREE) &&