diff options
| author | Collin Funk <collin.funk1@gmail.com> | 2025-09-23 19:17:14 -0700 |
|---|---|---|
| committer | Collin Funk <collin.funk1@gmail.com> | 2025-09-24 17:31:57 -0700 |
| commit | 1bc5ec61d8d960e1679b42f55c8f96992ced34ef (patch) | |
| tree | aa458fa9307db7b5b4a9e7704eccc515842112ba /src/df.c | |
| parent | tail: fix tailing larger number of lines in regular files (diff) | |
| download | coreutils-1bc5ec61d8d960e1679b42f55c8f96992ced34ef.tar.gz coreutils-1bc5ec61d8d960e1679b42f55c8f96992ced34ef.zip | |
maint: prefer countof over ARRAY_CARDINALITY
* bootstrap.conf (gnulib_modules): Add stdcountof-h.
* src/system.h: Include stdcountof.h.
(ARRAY_CARDINALITY): Remove definition.
* .gitignore (/lib/stdcountof.h): Ignore Gnulib generated file.
* src/csplit.c: Use countof instead of ARRAY_CARDINALITY.
* src/df.c: Likewise.
* src/digest.c: Likewise.
* src/dircolors.c: Likewise.
* src/factor.c: Likewise.
* src/join.c: Likewise.
* src/ls.c: Likewise.
* src/od.c: Likewise.
* src/sort.c: Likewise.
* src/stdbuf.c: Likewise.
* src/tr.c: Likewise.
Diffstat (limited to 'src/df.c')
| -rw-r--r-- | src/df.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -441,7 +441,7 @@ decode_output_arg (char const *arg) /* process S. */ display_field_t field = INVALID_FIELD; - for (idx_t i = 0; i < ARRAY_CARDINALITY (field_data); i++) + for (idx_t i = 0; i < countof (field_data); i++) { if (streq (field_data[i].arg, s)) { |
