summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-08-28 03:21:35 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-08-28 03:21:35 -0700
commit4588274d7824497693f8bb03fc31994ea60af269 (patch)
tree3a4d7cc6a7c1e50ef792680ca276d3015ab2db0b
parentc3263f3e66074d4332f87f1a29e361c96539eec7 (diff)
report-{layout,usage}: quick fix crashes since 6150dc
These have been broken since 6150dc, this is just a minimal fix to make them work again but there needs to be a proper cleanup of all this at some point.
-rw-r--r--src/report-layout.c6
-rw-r--r--src/report-usage.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/report-layout.c b/src/report-layout.c
index e5af386..6e99520 100644
--- a/src/report-layout.c
+++ b/src/report-layout.c
@@ -86,7 +86,7 @@ THUNK_DEFINE_STATIC(per_data_object, uint64_t *, iter_offset, ObjectHeader *, it
iter_object_header->size,
alignment_marker);
- return 0;
+ return 1;
}
@@ -149,9 +149,9 @@ THUNK_DEFINE_STATIC(per_journal, iou_t *, iou, journal_t **, journal_iter)
foo->journal = *journal_iter;
foo->out = f;
- return journal_get_header(iou, &foo->journal, &foo->header, THUNK(
+ return thunk_mid(journal_get_header(iou, &foo->journal, &foo->header, THUNK(
journal_iter_objects(iou, &foo->journal, &foo->header, &foo->iter_offset, &foo->iter_object_header, THUNK_INIT(
- per_data_object(closure, &foo->iter_offset, &foo->iter_object_header, foo->out)))));
+ per_data_object(closure, &foo->iter_offset, &foo->iter_object_header, foo->out))))));
}
diff --git a/src/report-usage.c b/src/report-usage.c
index d19eb0e..3b19c86 100644
--- a/src/report-usage.c
+++ b/src/report-usage.c
@@ -53,7 +53,7 @@ THUNK_DEFINE_STATIC(per_data_object, ObjectHeader *, iter_object_header, usage_t
total_usage->use_per_type[iter_object_header->type] += iter_object_header->size;
total_usage->use_total += iter_object_header->size;
- return 0;
+ return 1;
}
@@ -87,9 +87,9 @@ THUNK_DEFINE_STATIC(per_journal, iou_t *, iou, journal_t **, journal_iter, usage
total_usage->file_size += st.st_size;
(*n_journals)++;
- return journal_get_header(iou, &foo->journal, &foo->header, THUNK(
+ return thunk_mid(journal_get_header(iou, &foo->journal, &foo->header, THUNK(
journal_iter_objects(iou, &foo->journal, &foo->header, &foo->iter_offset, &foo->iter_object_header, THUNK_INIT(
- per_data_object(closure, &foo->iter_object_header, &foo->usage, total_usage)))));
+ per_data_object(closure, &foo->iter_object_header, &foo->usage, total_usage))))));
}
© 2021 All Rights Reserved