aboutsummaryrefslogtreecommitdiffstats
path: root/src/set-fields.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-11-14 20:35:56 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2023-11-14 20:38:24 -0800
commit23e26ed972fa157d5188d860545ea67037fc1935 (patch)
treeadb35a187d1dcf31000eb0d0faa72e523ec58ea2 /src/set-fields.c
parentpinky: fix string size calculation (diff)
downloadcoreutils-23e26ed972fa157d5188d860545ea67037fc1935.tar.gz
coreutils-23e26ed972fa157d5188d860545ea67037fc1935.zip
maint: DECIMAL_DIGIT_ACCUMULATE uses stdckdint.h
* src/system.h: Include <stdckdint.h>, since the new DECIMAL_DIGIT_ACCUMULATE uses it. Do not include stdckdint.h from files that also include system.h. (DECIMAL_DIGIT_ACCUMULATE): Omit last arg, which is no longer needed. Reimplement by using C23-style stdckdint.h’s ckd_mul and ckd_add, as that’s more standard and is more likely to generate better code.
Diffstat (limited to 'src/set-fields.c')
-rw-r--r--src/set-fields.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/set-fields.c b/src/set-fields.c
index a524b7fa4..1433e4fd9 100644
--- a/src/set-fields.c
+++ b/src/set-fields.c
@@ -245,7 +245,7 @@ set_fields (char const *fieldstr, unsigned int options)
lhs_specified = 1;
/* Detect overflow. */
- if (!DECIMAL_DIGIT_ACCUMULATE (value, *fieldstr - '0', uintmax_t)
+ if (!DECIMAL_DIGIT_ACCUMULATE (value, *fieldstr - '0')
|| value == UINTMAX_MAX)
{
/* In case the user specified -c$(echo 2^64|bc),22,