coverity scan CID:147633,type: sizeof not portable
coverity scan CID:147637,type: sizeof not portable
coverity scan CID:147638,type: sizeof not portable
coverity scan CID:147640,type: sizeof not portable
In these particular cases sizeof (XX **) happens to be equal to sizeof (X *),
but this is not a portable assumption.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn>
Closes #5144
nvlist_t **child, *nv;
uint64_t idx = 0;
- child = kmem_alloc(rvd->vdev_children * sizeof (nvlist_t **),
+ child = kmem_alloc(rvd->vdev_children * sizeof (nvlist_t *),
KM_SLEEP);
VERIFY(nvlist_alloc(&nv, NV_UNIQUE_NAME, KM_SLEEP) == 0);
if (fuidp->z_domain_table != NULL)
kmem_free(fuidp->z_domain_table,
- (sizeof (char **)) * fuidp->z_domain_cnt);
+ (sizeof (char *)) * fuidp->z_domain_cnt);
while ((zdomain = list_head(&fuidp->z_domains)) != NULL) {
list_remove(&fuidp->z_domains, zdomain);
return (fuid_infop);
fuid_infop->z_domain_table =
- kmem_zalloc(domcnt * sizeof (char **), KM_SLEEP);
+ kmem_zalloc(domcnt * sizeof (char *), KM_SLEEP);
zfs_replay_fuid_ugid(fuid_infop, uid, gid);
fuid_infop->z_domain_cnt = domcnt;
fuid_infop->z_domain_table =
- kmem_zalloc(domcnt * sizeof (char **), KM_SLEEP);
+ kmem_zalloc(domcnt * sizeof (char *), KM_SLEEP);
for (i = 0; i != idcnt; i++) {
zfs_fuid_t *zfuid;