]> granicus.if.org Git - zfs/commitdiff
Fix coverity defects: CID 147448, 147449, 147450, 147453, 147454
authorluozhengzheng <luo.zhengzheng@zte.com.cn>
Sun, 2 Oct 2016 18:24:54 +0000 (02:24 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 2 Oct 2016 18:24:54 +0000 (11:24 -0700)
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

cmd/zpios/zpios_main.c
cmd/zpool/zpool_vdev.c
lib/libzfs/libzfs_pool.c
module/zfs/fm.c
module/zfs/zfs_znode.c

index d0e3f7b91aac0db6b9056f968e6cf487b77458f0..a413453e47ee941816cccf6cc2abc19efa797460 100644 (file)
@@ -388,7 +388,7 @@ dev_clear(void)
                fprintf(stderr, "Ioctl() error %lu / %d: %d\n",
                    (unsigned long) ZPIOS_CFG, cfg.cfg_cmd, errno);
 
-       lseek(zpiosctl_fd, 0, SEEK_SET);
+       (void) lseek(zpiosctl_fd, 0, SEEK_SET);
 
        return (rc);
 }
index b51b9c9c3a899c457c72859796dc97a47ca777c9..b0db5e873c5b61d4ff5c5b43ff83bf5992e267a7 100644 (file)
@@ -735,7 +735,7 @@ make_leaf_vdev(nvlist_t *props, const char *arg, uint64_t is_log)
        }
 
        if (ashift > 0)
-               nvlist_add_uint64(vdev, ZPOOL_CONFIG_ASHIFT, ashift);
+               (void) nvlist_add_uint64(vdev, ZPOOL_CONFIG_ASHIFT, ashift);
 
        return (vdev);
 }
index a37ea7913108992a72bd3971267cd7812e865bb2..f515419b19b1fb746befbe6df4137bd42964aff5 100644 (file)
@@ -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 ||
            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);
                path = buf;
        } else if (nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0) {
index 2a425a7401d2a5ae541abf42353c4f50e47c797d..a1069d140c498db53ed9bf27b4fc4b66cf35ceb9 100644 (file)
@@ -652,7 +652,7 @@ zfs_zevent_next(zfs_zevent_t *ze, nvlist_t **event, uint64_t *event_size,
 
        ze->ze_zevent = ev;
        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;
        ze->ze_dropped = 0;
 out:
index 12dada4fc3411ed40f52c4ef2e66e4e13344016e..647ce48dc4dda5f3144aeb4ec0bee750d190f0b1 100644 (file)
@@ -456,7 +456,7 @@ zfs_inode_set_ops(zfs_sb_t *zsb, struct inode *ip)
         */
        case S_IFCHR:
        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));
                /*FALLTHROUGH*/
        case S_IFIFO: