summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libzfs/libzfs_dataset.c2
-rw-r--r--lib/libzfs/libzfs_sendrecv.c4
-rw-r--r--lib/libzpool/kernel.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c
index 3ff96f0c6..794d35fbe 100644
--- a/lib/libzfs/libzfs_dataset.c
+++ b/lib/libzfs/libzfs_dataset.c
@@ -2625,7 +2625,7 @@ uint64_t
zfs_prop_get_int(zfs_handle_t *zhp, zfs_prop_t prop)
{
char *source;
- uint64_t val;
+ uint64_t val = 0;
(void) get_numeric_property(zhp, prop, NULL, &source, &val);
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index bc8bd5f8a..6adcc7a54 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -3710,8 +3710,8 @@ zfs_receive(libzfs_handle_t *hdl, const char *tosnap, nvlist_t *props,
VERIFY(0 == close(cleanup_fd));
if (err == 0 && !flags->nomount && top_zfs) {
- zfs_handle_t *zhp;
- prop_changelist_t *clp;
+ zfs_handle_t *zhp = NULL;
+ prop_changelist_t *clp = NULL;
zhp = zfs_open(hdl, top_zfs, ZFS_TYPE_FILESYSTEM);
if (zhp != NULL) {
diff --git a/lib/libzpool/kernel.c b/lib/libzpool/kernel.c
index a68911451..549dd4c5c 100644
--- a/lib/libzpool/kernel.c
+++ b/lib/libzpool/kernel.c
@@ -996,7 +996,7 @@ kobj_open_file(char *name)
int
kobj_read_file(struct _buf *file, char *buf, unsigned size, unsigned off)
{
- ssize_t resid;
+ ssize_t resid = 0;
if (vn_rdwr(UIO_READ, (vnode_t *)file->_fd, buf, size, (offset_t)off,
UIO_SYSSPACE, 0, 0, 0, &resid) != 0)