strops: use strlen instead of strchr for string length

For wide string the equivalent funtion __wcslen is used. This change
makes it more symetrical.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
Kacper Piwiński 2025-12-01 16:42:54 +01:00 committed by Florian Weimer
parent 20092f2ef6
commit 82f4758410
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ _IO_str_init_static_internal (_IO_strfile *sf, char *ptr, size_t size,
char *end;
if (size == 0)
end = strchr (ptr, '\0');
end = ptr + strlen (ptr);
else if ((size_t) ptr + size > (size_t) ptr)
end = ptr + size;
else