]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(strnlen): Add cast to prevent warning.
authorUlrich Drepper <drepper@redhat.com>
Sat, 19 Feb 2000 05:27:17 +0000 (05:27 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 19 Feb 2000 05:27:17 +0000 (05:27 +0000)
string/bits/string2.h

index ccc0742edb6ad661e726e1156f69f16f657d98a2..811e8d0df82f6d157ec69e6be082d47f8a00df03 100644 (file)
@@ -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