Fix new locations of missing parenthesis according to gcc.
if (flags.dedup) {
featureflags |= (DMU_BACKUP_FEATURE_DEDUP |
DMU_BACKUP_FEATURE_DEDUPPROPS);
- if (err = pipe(pipefd)) {
+ if ((err = pipe(pipefd))) {
zfs_error_aux(zhp->zfs_hdl, strerror(errno));
return (zfs_error(zhp->zfs_hdl, EZFS_PIPEFAILED,
errbuf));
dda.outputfd = outfd;
dda.inputfd = pipefd[1];
dda.dedup_hdl = zhp->zfs_hdl;
- if (err = pthread_create(&tid, NULL, cksummer, &dda)) {
+ if ((err = pthread_create(&tid, NULL, cksummer, &dda))) {
(void) close(pipefd[0]);
(void) close(pipefd[1]);
zfs_error_aux(zhp->zfs_hdl, strerror(errno));
bplist_entry_t *bpe;
mutex_enter(&bpl->bpl_lock);
- while (bpe = list_head(&bpl->bpl_list)) {
+ while ((bpe = list_head(&bpl->bpl_list))) {
list_remove(&bpl->bpl_list, bpe);
mutex_exit(&bpl->bpl_lock);
func(arg, &bpe->bpe_blk, tx);
ref_os = os;
}
- if (err = dmu_buf_hold(ref_os, drrwbr->drr_refobject,
- drrwbr->drr_refoffset, FTAG, &dbp, DMU_READ_PREFETCH))
+ err = dmu_buf_hold(ref_os, drrwbr->drr_refobject,
+ drrwbr->drr_refoffset, FTAG, &dbp, DMU_READ_PREFETCH);
+ if (err)
return (err);
tx = dmu_tx_create(os);
if (featureflags & DMU_BACKUP_FEATURE_DEDUP) {
void *cookie = NULL;
- while (gmep = avl_destroy_nodes(&ra.guid_to_ds_map, &cookie)) {
+ while ((gmep = avl_destroy_nodes(&ra.guid_to_ds_map, &cookie))) {
dsl_dataset_rele(gmep->gme_ds, &ra.guid_to_ds_map);
kmem_free(gmep, sizeof (guid_map_entry_t));
}
{
dmu_tx_callback_t *dcb;
- while (dcb = list_head(cb_list)) {
+ while ((dcb = list_head(cb_list))) {
list_remove(cb_list, dcb);
dcb->dcb_func(dcb->dcb_data, error);
kmem_free(dcb, sizeof (dmu_tx_callback_t));
ZFETCHSTAT_BUMP(zfetchstat_hits);
} else {
ZFETCHSTAT_BUMP(zfetchstat_misses);
- if (fetched = dmu_zfetch_colinear(zf, &zst)) {
+ if ((fetched = dmu_zfetch_colinear(zf, &zst))) {
ZFETCHSTAT_BUMP(zfetchstat_colinear_hits);
} else {
ZFETCHSTAT_BUMP(zfetchstat_colinear_misses);
sizeof (sa_attr_table_t) * sa->sa_num_attrs);
cookie = NULL;
- while (layout = avl_destroy_nodes(&sa->sa_layout_hash_tree, &cookie)) {
+ while ((layout = avl_destroy_nodes(&sa->sa_layout_hash_tree, &cookie))){
sa_idx_tab_t *tab;
- while (tab = list_head(&layout->lot_idx_tab)) {
+ while ((tab = list_head(&layout->lot_idx_tab))) {
ASSERT(refcount_count(&tab->sa_refcount));
sa_idx_tab_rele(os, tab);
}
}
cookie = NULL;
- while (layout = avl_destroy_nodes(&sa->sa_layout_num_tree, &cookie)) {
+ while ((layout = avl_destroy_nodes(&sa->sa_layout_num_tree, &cookie))){
kmem_free(layout->lot_attrs,
sizeof (sa_attr_type_t) * layout->lot_attr_count);
kmem_free(layout, sizeof (sa_lot_t));
dmu_buf_t *db;
int error;
- if (error = dmu_bonus_hold(objset, objid, NULL, &db))
+ if ((error = dmu_bonus_hold(objset, objid, NULL, &db)))
return (error);
return (sa_handle_get_from_db(objset, db, userp, hdl_type,
ddt_sync(spa, txg);
dsl_scan_sync(dp, tx);
- while (vd = txg_list_remove(&spa->spa_vdev_txg_list, txg))
+ while ((vd = txg_list_remove(&spa->spa_vdev_txg_list, txg)))
vdev_sync(vd, txg);
if (pass == 1)
if ((error = spa_open(zc->zc_name, &spa, FTAG)) != 0)
return (error);
- if (error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
- zc->zc_iflags, &config)) {
+ if ((error = get_nvlist(zc->zc_nvlist_conf, zc->zc_nvlist_conf_size,
+ zc->zc_iflags, &config))) {
spa_close(spa, FTAG);
return (error);
}
* local property values.
*/
static int
-zfs_ioc_objset_recvd_props(zfs_cmd_t *zc)
+zfs_ioc_objset_recvd_props(struct file *filp, zfs_cmd_t *zc)
{
objset_t *os = NULL;
int error;
nvlist_t *nv;
- if (error = dmu_objset_hold(zc->zc_name, FTAG, &os))
+ if ((error = dmu_objset_hold(zc->zc_name, FTAG, &os)))
return (error);
/*
int error;
nvpair_t *pair;
- if (error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
- zc->zc_iflags, &props))
+ if ((error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size,
+ zc->zc_iflags, &props)))
return (error);
/*
if (prop == ZPROP_INVAL) {
if (zfs_prop_user(propname)) {
- if (err = zfs_secpolicy_write_perms(dsname,
- ZFS_DELEG_PERM_USERPROP, cr))
+ if ((err = zfs_secpolicy_write_perms(dsname,
+ ZFS_DELEG_PERM_USERPROP, cr)))
return (err);
return (0);
}
return (EINVAL);
}
- if (err = zfs_secpolicy_write_perms(dsname, perm, cr))
+ if ((err = zfs_secpolicy_write_perms(dsname, perm, cr)))
return (err);
return (0);
}