* src/misc.c (strncasecmp): Use size_t for length to match std.

* src/misc.h (strncasecmp): Fix the declaration.
This commit is contained in:
Paul Smith 2022-09-24 10:46:55 -04:00
parent d4cb7ae6d4
commit cf7f7de7ae
2 changed files with 2 additions and 2 deletions

View file

@ -675,7 +675,7 @@ int strcasecmp (const char *s1, const char *s2);
# define strncasecmp strncmpi # define strncasecmp strncmpi
# else # else
/* Create our own, in misc.c */ /* Create our own, in misc.c */
int strncasecmp (const char *s1, const char *s2, int n); int strncasecmp (const char *s1, const char *s2, size_t n);
# endif # endif
#endif #endif

View file

@ -688,7 +688,7 @@ strcasecmp (const char *s1, const char *s2)
substitute for it, define our own version. */ substitute for it, define our own version. */
int int
strncasecmp (const char *s1, const char *s2, int n) strncasecmp (const char *s1, const char *s2, size_t n)
{ {
while (n-- > 0) while (n-- > 0)
{ {