From afcbe44a7cf454f3588a60180d93f65df9e5fcc7 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Tue, 19 Nov 2024 11:17:50 +0100 Subject: Add byte human readable formatting --- src/format.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/format.c') diff --git a/src/format.c b/src/format.c index 0f25084..73d645e 100644 --- a/src/format.c +++ b/src/format.c @@ -94,7 +94,7 @@ static bool format_option_match(format_pair_t *part, const format_option_t *opti format_mark_t mark = 0; size_t off = 0, tmp = 0; - for (format_pair_t *ps = option->prefixes; ps != NULL && ps->string != NULL; ps++) { + for (const format_pair_t *ps = option->prefixes; ps != NULL && ps->string != NULL; ps++) { tmp = format_option_cmp(part->string, ps->string); if (tmp != 0) { off += tmp; @@ -108,7 +108,7 @@ static bool format_option_match(format_pair_t *part, const format_option_t *opti off += tmp; mark |= option->option.mark; - for (format_pair_t *ss = option->suffixes; ss != NULL && ss->string != NULL; ss++) { + for (const format_pair_t *ss = option->suffixes; ss != NULL && ss->string != NULL; ss++) { tmp = format_option_cmp(part->string + off, ss->string); if (tmp != 0) { off += tmp; -- cgit v1.2.3