]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
strfmon_l: be consistent about unsigned vs size_t
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 26 Jun 2026 18:34:12 +0000 (11:34 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 26 Jun 2026 21:34:58 +0000 (14:34 -0700)
* lib/strfmon_l.c (directives_t, fmon_parse):
Count is merely unsigned int, not size_t.

ChangeLog
lib/strfmon_l.c

index 03575cf89bc29930f21f22c68d24983d370b0b0e..1164db433b6fbcea4cc9ceed76511c6c8770da4f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2026-06-26  Paul Eggert  <eggert@cs.ucla.edu>
 
+       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.
 
index 64212a5be4229e0c0d9f89b17beaaffd8bf4f9f5..a73d2ef57147ecd35410378335eb4255b7370992 100644 (file)
@@ -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')