* lib/strfmon_l.c (directives_t, fmon_parse): Count is merely unsigned int, not size_t. --- ChangeLog | 4 ++++ lib/strfmon_l.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 03575cf89b..1164db433b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2026-06-26 Paul Eggert <[email protected]> + strfmon_l: be consistent about unsigned vs size_t + * lib/strfmon_l.c (directives_t, fmon_parse): + Count is merely unsigned int, not size_t. + hashcode-mem: don’t infloop if UINT_MAX < size * lib/hashcode-mem.c (hash_pjw_bare): Use size_t for loop index. diff --git a/lib/strfmon_l.c b/lib/strfmon_l.c index 64212a5be4..a73d2ef571 100644 --- a/lib/strfmon_l.c +++ b/lib/strfmon_l.c @@ -41,7 +41,7 @@ directive_t; /* A parsed format string. */ typedef struct { - size_t count; + unsigned int count; directive_t dir[MAX_ARGS]; } directives_t; @@ -52,7 +52,7 @@ directives_t; static int fmon_parse (const char *format, directives_t *directivesp) { - size_t count = 0; + unsigned int count = 0; const char *cp = format; while (*cp != '\0') -- 2.54.0
