mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-14 07:10:05 +00:00
(strnlen): Add cast to prevent warning.
This commit is contained in:
parent
c5f2625149
commit
cec34dbcb9
@ -1026,7 +1026,7 @@ __STRING_INLINE size_t
|
||||
strnlen (__const char *__string, size_t __maxlen)
|
||||
{
|
||||
__const char *__end = (__const char *) memchr (__string, '\0', __maxlen);
|
||||
return __end ? __end - __string : __maxlen;
|
||||
return __end ? (size_t) (__end - __string) : __maxlen;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user