diff options
| author | Federico Angelilli <code@fedang.net> | 2024-11-19 11:17:50 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-11-19 11:17:50 +0100 |
| commit | afcbe44a7cf454f3588a60180d93f65df9e5fcc7 (patch) | |
| tree | 7a3b94a9c9f7ef8cbd3062b26e31ef25b9d9a742 /src/format.c | |
| parent | 79a32360e76cb0739312e15299fc22941e51b64b (diff) | |
Add byte human readable formatting
Diffstat (limited to 'src/format.c')
| -rw-r--r-- | src/format.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |
