X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibzfs%2Flibzfs_import.c;h=386ab002f20b30a7178b6100af68204a3c754c70;hb=d2c15e84e9c37f9c3d10dfffc9bd6be4600bf924;hp=e1370350fd52d7026dcb1988eb3d3f7d07192523;hpb=572e285762521df27fe5b026f409ba1a21abb7ac;p=zfs.git diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index e137035..386ab00 100644 --- a/lib/libzfs/libzfs_import.c +++ b/lib/libzfs/libzfs_import.c @@ -370,7 +370,7 @@ static nvlist_t * refresh_config(libzfs_handle_t *hdl, nvlist_t *config) { nvlist_t *nvl; - zfs_cmd_t zc = { 0 }; + zfs_cmd_t zc = { "\0", "\0", "\0", "\0", 0 }; int err; if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) @@ -410,7 +410,9 @@ refresh_config(libzfs_handle_t *hdl, nvlist_t *config) boolean_t vdev_is_hole(uint64_t *hole_array, uint_t holes, uint_t id) { - for (int c = 0; c < holes; c++) { + int c; + + for (c = 0; c < holes; c++) { /* Top-level is a hole */ if (hole_array[c] == id) @@ -432,7 +434,7 @@ get_configs(libzfs_handle_t *hdl, pool_list_t *pl, boolean_t active_ok) pool_entry_t *pe; vdev_entry_t *ve; config_entry_t *ce; - nvlist_t *ret = NULL, *config = NULL, *tmp, *nvtop, *nvroot; + nvlist_t *ret = NULL, *config = NULL, *tmp = NULL, *nvtop, *nvroot; nvlist_t **spares, **l2cache; uint_t i, nspares, nl2cache; boolean_t config_seen;