aboutsummaryrefslogtreecommitdiff
path: root/string/bits/string2.h
diff options
context:
space:
mode:
Diffstat (limited to 'string/bits/string2.h')
-rw-r--r--string/bits/string2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/string/bits/string2.h b/string/bits/string2.h
index 9d31e16..f8c32e3 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -1025,7 +1025,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