mirror of git://sourceware.org/git/glibc.git
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:
parent
20092f2ef6
commit
82f4758410
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue