summaryrefslogtreecommitdiff
path: root/usr/src/lib/libnvpair
diff options
context:
space:
mode:
authorSteve Dougherty <sdougherty@barracuda.com>2015-11-10 19:41:10 -0500
committerRobert Mustacchi <rm@joyent.com>2015-11-17 15:19:53 -0800
commit759e89be359f2af635e4122d147df56bce948773 (patch)
treea2da17b63c6933f3cfb600933cad38a0b522ccde /usr/src/lib/libnvpair
parent68ecb2ec930c4b0f00acaf8e0abb2b19c4b8b76f (diff)
downloadillumos-joyent-759e89be359f2af635e4122d147df56bce948773.tar.gz
6447 handful of nvpair cleanups
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src/lib/libnvpair')
-rw-r--r--usr/src/lib/libnvpair/libnvpair.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/lib/libnvpair/libnvpair.c b/usr/src/lib/libnvpair/libnvpair.c
index 734ec6c2f6..d4d2000028 100644
--- a/usr/src/lib/libnvpair/libnvpair.c
+++ b/usr/src/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>
@@ -211,7 +211,7 @@ NVLIST_PRTFUNC(int32, int32_t, int32_t, "%d")
NVLIST_PRTFUNC(uint32, uint32_t, uint32_t, "0x%x")
NVLIST_PRTFUNC(int64, int64_t, longlong_t, "%lld")
NVLIST_PRTFUNC(uint64, uint64_t, u_longlong_t, "0x%llx")
-NVLIST_PRTFUNC(double, double, double, "0x%llf")
+NVLIST_PRTFUNC(double, double, double, "0x%f")
NVLIST_PRTFUNC(string, char *, char *, "%s")
NVLIST_PRTFUNC(hrtime, hrtime_t, hrtime_t, "0x%llx")
@@ -1229,7 +1229,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, &val_arg);
@@ -1240,7 +1241,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, &val_arg);