From f1acefd24195f30bc9939a01f37c057c7100a9af Mon Sep 17 00:00:00 2001 From: zkabelac Date: Mon, 15 Feb 2010 18:36:48 +0000 Subject: [PATCH] Fix dm_report_field_uint64 to really use 64bit. (function is currently not in use) --- libdm/libdm-report.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index aead86415..e13115a7a 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -207,7 +207,7 @@ int dm_report_field_int32(struct dm_report *rh, int dm_report_field_uint64(struct dm_report *rh, struct dm_report_field *field, const uint64_t *data) { - const int value = *data; + const uint64_t value = *data; uint64_t *sortval; char *repstr; @@ -221,12 +221,12 @@ int dm_report_field_uint64(struct dm_report *rh, return 0; } - if (dm_snprintf(repstr, 21, "%d", value) < 0) { - log_error("dm_report_field_uint64: uint64 too big: %d", value); + if (dm_snprintf(repstr, 21, "%" PRIu64 , value) < 0) { + log_error("dm_report_field_uint64: uint64 too big: %" PRIu64, value); return 0; } - *sortval = (const uint64_t) value; + *sortval = value; field->sort_value = sortval; field->report_string = repstr; -- 2.43.5