t/dedupe: fixup bloom entry calculation
[fio.git] / trim.c
diff --git a/trim.c b/trim.c
index a9b15d686606bee6856b3998e5b7104bc633ac18..a7f1b8673396413f818eaa20534c3d686886f5ad 100644 (file)
--- a/trim.c
+++ b/trim.c
@@ -24,7 +24,7 @@ int get_next_trim(struct thread_data *td, struct io_u *io_u)
                return 1;
 
        assert(td->trim_entries);
-       ipo = flist_entry(td->trim_list.next, struct io_piece, trim_list);
+       ipo = flist_first_entry(&td->trim_list, struct io_piece, trim_list);
        remove_trim_entry(td, ipo);
 
        io_u->offset = ipo->offset;
@@ -70,7 +70,7 @@ int get_next_trim(struct thread_data *td, struct io_u *io_u)
 int io_u_should_trim(struct thread_data *td, struct io_u *io_u)
 {
        unsigned long long val;
-       long r;
+       unsigned long r;
 
        if (!td->o.trim_percentage)
                return 0;