File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,14 @@ static inline int byte_is_match(uint32_t w, uint32_t pat)
2020}
2121
2222/* strlen that scans by words whenever possible for efficiency. */
23- int32_t strlen (const char * s )
23+ size_t strlen (const char * s )
2424{
2525 const char * p = s ;
2626
2727 /* Align pointer to word boundary (4 bytes) */
2828 while ((uint32_t ) p & 3 ) {
2929 if (!* p ) /* If null terminator is found byte-by-byte */
30- return (int32_t ) (p - s );
30+ return (size_t ) (p - s );
3131 p ++ ;
3232 }
3333
@@ -42,7 +42,7 @@ int32_t strlen(const char *s)
4242 p = (const char * ) w ;
4343 while (* p ) /* Scan byte-by-byte until the null terminator. */
4444 p ++ ;
45- return (int32_t ) (p - s ); /* Return total length. */
45+ return (size_t ) (p - s ); /* Return total length. */
4646}
4747
4848void * memcpy (void * dst , const void * src , uint32_t len )
You can’t perform that action at this time.
0 commit comments