diff options
author | Steve Dougherty <[email protected]> | 2015-11-10 19:41:10 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-08-30 12:04:27 -0700 |
commit | de327eccbb063c2321a40e167ad5c5b54ce2c227 (patch) | |
tree | fdd083f8f8b7bc17e306029008ae783c6ee5c145 /lib/libnvpair | |
parent | ecaebdbcf693d9f08844e04dc97f6859b7c37c80 (diff) |
OpenZFS 6447 - handful of nvpair cleanups
Authored by: Steve Dougherty <[email protected]>
Reviewed by: Josef 'Jeff' Sipek <[email protected]>
Reviewed by: Andy Stormont <[email protected]>
Reviewed by: Garrett D'Amore <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
Reviewed-by: Don Brady <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Ported-by: Giuseppe Di Natale <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/6447
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/759e89b
Closes #6581
Diffstat (limited to 'lib/libnvpair')
-rw-r--r-- | lib/libnvpair/libnvpair.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libnvpair/libnvpair.c b/lib/libnvpair/libnvpair.c index 7e24dd844..0cf38c950 100644 --- a/lib/libnvpair/libnvpair.c +++ b/lib/libnvpair/libnvpair.c @@ -24,7 +24,7 @@ */ #include <unistd.h> -#include <strings.h> +#include <string.h> #include <libintl.h> #include <sys/types.h> #include <sys/inttypes.h> @@ -1219,7 +1219,8 @@ nvpair_value_match_regex(nvpair_t *nvp, int ai, break; } case DATA_TYPE_BOOLEAN_VALUE: { - boolean_t val, val_arg; + int32_t val_arg; + boolean_t val; /* scanf boolean_t from value and check for match */ sr = sscanf(value, "%"SCNi32, (int32_t *)&val_arg); @@ -1230,7 +1231,8 @@ nvpair_value_match_regex(nvpair_t *nvp, int ai, break; } case DATA_TYPE_BOOLEAN_ARRAY: { - boolean_t *val_array, val_arg; + boolean_t *val_array; + int32_t val_arg; /* check indexed value of array for match */ sr = sscanf(value, "%"SCNi32, (int32_t *)&val_arg); |