mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix coverity defects: CID 147448, 147449, 147450, 147453, 147454
coverity scan CID:147448,type: unchecked return value coverity scan CID:147449,type: unchecked return value coverity scan CID:147450,type: unchecked return value coverity scan CID:147453,type: unchecked return value coverity scan CID:147454,type: unchecked return value Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: luozhengzheng <luo.zhengzheng@zte.com.cn> Closes #5206
This commit is contained in:
parent
0ca5261be4
commit
aecdc70604
@ -388,7 +388,7 @@ dev_clear(void)
|
|||||||
fprintf(stderr, "Ioctl() error %lu / %d: %d\n",
|
fprintf(stderr, "Ioctl() error %lu / %d: %d\n",
|
||||||
(unsigned long) ZPIOS_CFG, cfg.cfg_cmd, errno);
|
(unsigned long) ZPIOS_CFG, cfg.cfg_cmd, errno);
|
||||||
|
|
||||||
lseek(zpiosctl_fd, 0, SEEK_SET);
|
(void) lseek(zpiosctl_fd, 0, SEEK_SET);
|
||||||
|
|
||||||
return (rc);
|
return (rc);
|
||||||
}
|
}
|
||||||
|
@ -735,7 +735,7 @@ make_leaf_vdev(nvlist_t *props, const char *arg, uint64_t is_log)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ashift > 0)
|
if (ashift > 0)
|
||||||
nvlist_add_uint64(vdev, ZPOOL_CONFIG_ASHIFT, ashift);
|
(void) nvlist_add_uint64(vdev, ZPOOL_CONFIG_ASHIFT, ashift);
|
||||||
|
|
||||||
return (vdev);
|
return (vdev);
|
||||||
}
|
}
|
||||||
|
@ -3468,7 +3468,7 @@ zpool_vdev_name(libzfs_handle_t *hdl, zpool_handle_t *zhp, nvlist_t *nv,
|
|||||||
|
|
||||||
if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_NOT_PRESENT, &value) == 0 ||
|
if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_NOT_PRESENT, &value) == 0 ||
|
||||||
name_flags & VDEV_NAME_GUID) {
|
name_flags & VDEV_NAME_GUID) {
|
||||||
nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &value);
|
(void) nvlist_lookup_uint64(nv, ZPOOL_CONFIG_GUID, &value);
|
||||||
(void) snprintf(buf, sizeof (buf), "%llu", (u_longlong_t)value);
|
(void) snprintf(buf, sizeof (buf), "%llu", (u_longlong_t)value);
|
||||||
path = buf;
|
path = buf;
|
||||||
} else if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0) {
|
} else if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0) {
|
||||||
|
@ -652,7 +652,7 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,
|
|||||||
|
|
||||||
ze->ze_zevent = ev;
|
ze->ze_zevent = ev;
|
||||||
list_insert_head(&ev->ev_ze_list, ze);
|
list_insert_head(&ev->ev_ze_list, ze);
|
||||||
nvlist_dup(ev->ev_nvl, event, KM_SLEEP);
|
(void) nvlist_dup(ev->ev_nvl, event, KM_SLEEP);
|
||||||
*dropped = ze->ze_dropped;
|
*dropped = ze->ze_dropped;
|
||||||
ze->ze_dropped = 0;
|
ze->ze_dropped = 0;
|
||||||
out:
|
out:
|
||||||
|
@ -456,7 +456,7 @@ zfs_inode_set_ops(zfs_sb_t *zsb, struct inode *ip)
|
|||||||
*/
|
*/
|
||||||
case S_IFCHR:
|
case S_IFCHR:
|
||||||
case S_IFBLK:
|
case S_IFBLK:
|
||||||
sa_lookup(ITOZ(ip)->z_sa_hdl, SA_ZPL_RDEV(zsb), &rdev,
|
(void) sa_lookup(ITOZ(ip)->z_sa_hdl, SA_ZPL_RDEV(zsb), &rdev,
|
||||||
sizeof (rdev));
|
sizeof (rdev));
|
||||||
/*FALLTHROUGH*/
|
/*FALLTHROUGH*/
|
||||||
case S_IFIFO:
|
case S_IFIFO:
|
||||||
|
Loading…
Reference in New Issue
Block a user