]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
Fixed uninitialized variable
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Aug 2011 23:24:04 +0000 (16:24 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Aug 2011 23:26:06 +0000 (16:26 -0700)
This warning was accidentally introduced by commit
b7936d5c2337bc976ac831c1c38de563844c36b.  The fix is to
simply initialize the variable to ZFS_DELEG_WHO_UNKNOWN.

  cmd/zfs/zfs_main.c:4460:25: warning: 'who_type' may be
  used uninitialized in this function

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
cmd/zfs/zfs_main.c

index 444869a47270c74e7e4828e16aa82be0078f8e4b..82a6d569fcac852548cece15cb80d4ca148e940d 100644 (file)
@@ -4457,7 +4457,7 @@ construct_fsacl_list(boolean_t un, struct allow_opts *opts, nvlist_t **nvlp)
 
                while (curr < end) {
                        const char *who;
-                       zfs_deleg_who_type_t who_type;
+                       zfs_deleg_who_type_t who_type = ZFS_DELEG_WHO_UNKNOWN;
                        char *endch;
                        char *delim = strchr(curr, ',');
                        char errbuf[256];