From dd6e49e8a62d309cfc4d9f753f5b4ef949571684 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 8 Jul 2023 22:13:49 +0100 Subject: [PATCH] kernel: tweak thresholds for data size->string conversion --- util/data_size.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/data_size.c b/util/data_size.c index 9f50843..5273265 100644 --- a/util/data_size.c +++ b/util/data_size.c @@ -50,7 +50,7 @@ void data_size_to_string(size_t value, char *out, size_t outsz) size_t def_count = sizeof(k_magnitudes) / sizeof(struct magnitude); for (size_t i = 0; i < def_count; i++) { - if (value > k_magnitudes[i].threshold) { + if (value >= k_magnitudes[i].threshold) { size_t big, small; convert(&big, &small, value, k_magnitudes[i].threshold); if (small) {