X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzfs_ioctl.c;h=ff31144d3633b952f81166ac45c3d04401b5156a;hb=e5dc681a50a41d42c18b52abc8d5a3c2a357bdaa;hp=1b63c9bf45ef54cee88cc8001732a903e47db7ad;hpb=572e285762521df27fe5b026f409ba1a21abb7ac;p=zfs.git diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index 1b63c9b..ff31144 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -166,7 +166,7 @@ history_str_get(zfs_cmd_t *zc) { char *buf; - if (zc->zc_history == NULL) + if (zc->zc_history == 0) return (NULL); buf = kmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP); @@ -1866,7 +1866,7 @@ zfs_ioc_objset_zplprops(zfs_cmd_t *zc) * which we aren't supposed to do with a DS_MODE_USER * hold, because it could be inconsistent. */ - if (zc->zc_nvlist_dst != NULL && + if (zc->zc_nvlist_dst != 0 && !zc->zc_objset_stats.dds_inconsistent && dmu_objset_type(os) == DMU_OST_ZFS) { nvlist_t *nv; @@ -2458,7 +2458,7 @@ zfs_ioc_set_prop(zfs_cmd_t *zc) error = zfs_set_prop_nvlist(zc->zc_name, source, nvl, &errors); - if (zc->zc_nvlist_dst != NULL && errors != NULL) { + if (zc->zc_nvlist_dst != 0 && errors != NULL) { (void) put_nvlist(zc, errors); } @@ -2609,7 +2609,7 @@ zfs_ioc_pool_get_props(zfs_cmd_t *zc) spa_close(spa, FTAG); } - if (error == 0 && zc->zc_nvlist_dst != NULL) + if (error == 0 && zc->zc_nvlist_dst != 0) error = put_nvlist(zc, nvp); else error = EFAULT; @@ -2917,7 +2917,7 @@ zfs_ioc_create(zfs_cmd_t *zc) strchr(zc->zc_name, '%')) return (EINVAL); - if (zc->zc_nvlist_src != NULL && + if (zc->zc_nvlist_src != 0 && (error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size, zc->zc_iflags, &nvprops)) != 0) return (error); @@ -3041,7 +3041,7 @@ zfs_ioc_snapshot(zfs_cmd_t *zc) if (snapshot_namecheck(zc->zc_value, NULL, NULL) != 0) return (EINVAL); - if (zc->zc_nvlist_src != NULL && + if (zc->zc_nvlist_src != 0 && (error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size, zc->zc_iflags, &nvprops)) != 0) return (error); @@ -3563,7 +3563,7 @@ zfs_ioc_recv(zfs_cmd_t *zc) tosnap = strchr(tofs, '@'); *tosnap++ = '\0'; - if (zc->zc_nvlist_src != NULL && + if (zc->zc_nvlist_src != 0 && (error = get_nvlist(zc->zc_nvlist_src, zc->zc_nvlist_src_size, zc->zc_iflags, &props)) != 0) return (error); @@ -3919,7 +3919,7 @@ zfs_ioc_clear(zfs_cmd_t *zc) nvlist_t *policy; nvlist_t *config = NULL; - if (zc->zc_nvlist_src == NULL) + if (zc->zc_nvlist_src == 0) return (EINVAL); if ((error = get_nvlist(zc->zc_nvlist_src,