aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2018-01-22 05:52:39 +0000
committerAlexander Motin <mav@FreeBSD.org>2018-01-22 05:52:39 +0000
commit4eb2803697e3ce8644826bd4db8cc6d97dae89cd (patch)
treee9960502421aa561222e452dc3c62c643c64badb /cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
parentcf52647c41665d0e813c82c3a59c8bd4c9c1d243 (diff)
parent1e2bad5ea0535c78fa43eb68a4cfa6260a59fcb5 (diff)
downloadsrc-4eb2803697e3ce8644826bd4db8cc6d97dae89cd.tar.gz
src-4eb2803697e3ce8644826bd4db8cc6d97dae89cd.zip
MFV r328251: 8652 Tautological comparisons with ZPROP_INVAL
illumos/illumos-gate@4ae5f5f06c6c2d1db8167480f7d9e3b5378ba2f2 https://www.illumos.org/issues/8652: Clang and GCC prefer to use unsigned ints to store enums. With Clang, that causes tautological comparison warnings when comparing a zfs_prop_t or zpool_prop_t variable to the macro ZPROP_INVAL. It's likely that error handling code is being silently removed as a result. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Igor Kozhukhov <igor@dilos.org> Approved by: Gordon Ross <gwr@nexenta.com> Author: Alan Somers <asomers@gmail.com>
Notes
Notes: svn path=/head/; revision=328252
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c')
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
index 2be01915a64d..962b3ff2b61b 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
@@ -445,7 +445,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname,
const char *propname = nvpair_name(elem);
prop = zpool_name_to_prop(propname);
- if (prop == ZPROP_INVAL && zpool_prop_feature(propname)) {
+ if (prop == ZPOOL_PROP_INVAL && zpool_prop_feature(propname)) {
int err;
char *fname = strchr(propname, '@') + 1;
@@ -484,7 +484,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname,
/*
* Make sure this property is valid and applies to this type.
*/
- if (prop == ZPROP_INVAL) {
+ if (prop == ZPOOL_PROP_INVAL) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"invalid property '%s'"), propname);
(void) zfs_error(hdl, EZFS_BADPROP, errbuf);