Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/lib/libnvpair use proper format str...
details: https://anonhg.NetBSD.org/src/rev/90a07e6e4899
branches: trunk
changeset: 790736:90a07e6e4899
user: christos <christos%NetBSD.org@localhost>
date: Sat Oct 19 23:07:39 2013 +0000
description:
use proper format strings.
diffstat:
external/cddl/osnet/dist/lib/libnvpair/libnvpair.c | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diffs (76 lines):
diff -r a9a60792dd7d -r 90a07e6e4899 external/cddl/osnet/dist/lib/libnvpair/libnvpair.c
--- a/external/cddl/osnet/dist/lib/libnvpair/libnvpair.c Sat Oct 19 22:58:40 2013 +0000
+++ b/external/cddl/osnet/dist/lib/libnvpair/libnvpair.c Sat Oct 19 23:07:39 2013 +0000
@@ -128,13 +128,13 @@
case DATA_TYPE_INT64: {
int64_t val;
(void) nvpair_value_int64(nvp, &val);
- (void) fprintf(fp, " %lld", (longlong_t)val);
+ (void) fprintf(fp, " %" PRId64 , val);
break;
}
case DATA_TYPE_UINT64: {
uint64_t val;
(void) nvpair_value_uint64(nvp, &val);
- (void) fprintf(fp, " 0x%llx", (u_longlong_t)val);
+ (void) fprintf(fp, " 0x%" PRIx64, val);
break;
}
case DATA_TYPE_DOUBLE: {
@@ -209,15 +209,14 @@
int64_t *val;
(void) nvpair_value_int64_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- (void) fprintf(fp, " %lld", (longlong_t)val[i]);
+ (void) fprintf(fp, " %" PRId64, val[i]);
break;
}
case DATA_TYPE_UINT64_ARRAY: {
uint64_t *val;
(void) nvpair_value_uint64_array(nvp, &val, &nelem);
for (i = 0; i < nelem; i++)
- (void) fprintf(fp, " 0x%llx",
- (u_longlong_t)val[i]);
+ (void) fprintf(fp, " 0x%" PRIx64, val[i]);
break;
}
case DATA_TYPE_STRING_ARRAY: {
@@ -230,7 +229,7 @@
case DATA_TYPE_HRTIME: {
hrtime_t val;
(void) nvpair_value_hrtime(nvp, &val);
- (void) fprintf(fp, " 0x%llx", val);
+ (void) fprintf(fp, " 0x%jx", (intmax_t)val);
break;
}
case DATA_TYPE_NVLIST: {
@@ -344,11 +343,11 @@
break;
case DATA_TYPE_INT64:
- NVP(elem, int64, int64_t, longlong_t, "%lld");
+ NVP(elem, int64, int64_t, int64_t, "%" PRIx64);
break;
case DATA_TYPE_UINT64:
- NVP(elem, uint64, uint64_t, u_longlong_t, "%llu");
+ NVP(elem, uint64, uint64_t, uint64_t, "%" PRIu64);
break;
case DATA_TYPE_STRING:
@@ -384,12 +383,12 @@
break;
case DATA_TYPE_INT64_ARRAY:
- NVPA(elem, int64_array, int64_t, longlong_t, "%lld");
+ NVPA(elem, int64_array, int64_t, int64_t, "%" PRId64);
break;
case DATA_TYPE_UINT64_ARRAY:
- NVPA(elem, uint64_array, uint64_t, u_longlong_t,
- "%llu");
+ NVPA(elem, uint64_array, uint64_t, uint64_t,
+ "%" PRIu64);
break;
case DATA_TYPE_STRING_ARRAY:
Home |
Main Index |
Thread Index |
Old Index