diff options
author | Brian Behlendorf <[email protected]> | 2010-12-16 14:05:42 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-01-06 15:04:28 -0800 |
commit | 149e873ab174ded1f632f2b2eb2267593517c7ca (patch) | |
tree | cfc9d55c194367dd5e7407112103b65baca9e230 /cmd | |
parent | 683fe41fc718fd43f57aa9ca76457fe34e62057c (diff) |
Fix minor compiler warnings
These compiler warnings were introduced when code which was
previously #ifdef'ed out by HAVE_ZPL was re-added for use
by the posix layer. All of the following changes should be
obviously correct and will cause no semantic changes.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zfs/zfs_main.c | 12 | ||||
-rw-r--r-- | cmd/zinject/zinject.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 5f22e434e..e2c39a856 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -3153,11 +3153,11 @@ share_mount_one(zfs_handle_t *zhp, int op, int flags, char *protocol, shared_nfs = zfs_is_shared_nfs(zhp, NULL); shared_smb = zfs_is_shared_smb(zhp, NULL); - if (shared_nfs && shared_smb || - (shared_nfs && strcmp(shareopts, "on") == 0 && - strcmp(smbshareopts, "off") == 0) || - (shared_smb && strcmp(smbshareopts, "on") == 0 && - strcmp(shareopts, "off") == 0)) { + if ((shared_nfs && shared_smb) || + ((shared_nfs && strcmp(shareopts, "on") == 0) && + (strcmp(smbshareopts, "off") == 0)) || + ((shared_smb && strcmp(smbshareopts, "on") == 0) && + (strcmp(shareopts, "off") == 0))) { if (!explicit) return (0); @@ -3622,7 +3622,7 @@ unshare_unmount(int op, int argc, char **argv) */ struct mnttab entry; uu_avl_pool_t *pool; - uu_avl_t *tree; + uu_avl_t *tree = NULL; unshare_unmount_node_t *node; uu_avl_index_t idx; uu_avl_walk_t *walk; diff --git a/cmd/zinject/zinject.c b/cmd/zinject/zinject.c index 3ad90e329..e76e626fa 100644 --- a/cmd/zinject/zinject.c +++ b/cmd/zinject/zinject.c @@ -566,7 +566,7 @@ main(int argc, char **argv) zinject_record_t record = { 0 }; char pool[MAXNAMELEN]; char dataset[MAXNAMELEN]; - zfs_handle_t *zhp; + zfs_handle_t *zhp = NULL; int nowrites = 0; int dur_txg = 0; int dur_secs = 0; |