From 75ff15cdd939059c9c517a4c9106353ef42cf047 Mon Sep 17 00:00:00 2001 From: George Melikov Date: Tue, 24 Jan 2017 20:23:34 +0300 Subject: [PATCH] OpenZFS 6872 - zfs libraries should not allow uninitialized variables Porting notes: - Many changes were already made in ZoL (for ex. in d4ed66734). Authored by: Paul Dagnelie Reviewed by: Dan Kimmel Reviewed by: George Wilson Reviewed by: Prakash Surya Reviewed by: Yuri Pankov Approved by: Robert Mustacchi Reviewed-by: Brian Behlendorf Ported-by: George Melikov OpenZFS-issue: https://www.illumos.org/issues/6872 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/f83b46b Closes #5640 --- cmd/zpool/zpool_vdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index c4ce0aaa697b..c0d3076d203d 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2015 by Delphix. All rights reserved. * Copyright (c) 2016 Intel Corporation. * Copyright 2016 Igor Kozhukhov . */ @@ -787,7 +787,6 @@ get_replication(nvlist_t *nvroot, boolean_t fatal) verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, &top, &toplevels) == 0); - lastrep.zprl_type = NULL; for (t = 0; t < toplevels; t++) { uint64_t is_log = B_FALSE;