From 722542fabb30915653a222a6dca8f34338db4e80 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Wed, 29 Mar 2017 20:41:33 +0100 Subject: [PATCH] libdm: make _find_extent() nr_extents argument uint64_t --- libdm/libdm-stats.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index b553da5f5..5a454fdae 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -4472,7 +4472,7 @@ bad: #define MATCH_EXTENT(e, s, l) \ (((e).start == (s)) && ((e).len == (l))) -static struct _extent *_find_extent(size_t nr_extents, struct _extent *extents, +static struct _extent *_find_extent(uint64_t nr_extents, struct _extent *extents, uint64_t start, uint64_t len) { size_t i; @@ -4685,9 +4685,10 @@ static uint64_t *_stats_map_file_regions(struct dm_stats *dms, int fd, */ for (i = 0; i < *count; i++) { if (update) { - if ((old_ext = _find_extent(nr_kept, old_extents, - extents[i].start, - extents[i].len))) { + if ((old_ext = _find_extent((uint64_t) nr_kept, + old_extents, + extents[i].start, + extents[i].len))) { regions[i] = old_ext->id; continue; }