]> granicus.if.org Git - zfs/commitdiff
OpenZFS 6872 - zfs libraries should not allow uninitialized variables
authorGeorge Melikov <mail@gmelikov.ru>
Tue, 24 Jan 2017 17:23:34 +0000 (20:23 +0300)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 24 Jan 2017 17:23:34 +0000 (09:23 -0800)
Porting notes:
- Many changes were already made in ZoL (for ex. in d4ed66734).

Authored by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: George Melikov <mail@gmelikov.ru>
OpenZFS-issue: https://www.illumos.org/issues/6872
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/f83b46b
Closes #5640

cmd/zpool/zpool_vdev.c

index c4ce0aaa697b6f71f4cf7a227686574afe37da99..c0d3076d203d43857e6f0ef1b827986f6298fdb6 100644 (file)
@@ -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 <ikozhukhov@gmail.com>.
  */
@@ -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;