(strnlen): Add cast to prevent warning.

This commit is contained in:
Ulrich Drepper 2000-02-19 05:27:17 +00:00
parent c5f2625149
commit cec34dbcb9

View File

@ -1026,7 +1026,7 @@ __STRING_INLINE size_t
strnlen (__const char *__string, size_t __maxlen) strnlen (__const char *__string, size_t __maxlen)
{ {
__const char *__end = (__const char *) memchr (__string, '\0', __maxlen); __const char *__end = (__const char *) memchr (__string, '\0', __maxlen);
return __end ? __end - __string : __maxlen; return __end ? (size_t) (__end - __string) : __maxlen;
} }
# endif # endif
#endif #endif