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)
20
20
}
21
21
22
22
/* strlen that scans by words whenever possible for efficiency. */
23
- int32_t strlen (const char * s )
23
+ size_t strlen (const char * s )
24
24
{
25
25
const char * p = s ;
26
26
27
27
/* Align pointer to word boundary (4 bytes) */
28
28
while ((uint32_t ) p & 3 ) {
29
29
if (!* p ) /* If null terminator is found byte-by-byte */
30
- return (int32_t ) (p - s );
30
+ return (size_t ) (p - s );
31
31
p ++ ;
32
32
}
33
33
@@ -42,7 +42,7 @@ int32_t strlen(const char *s)
42
42
p = (const char * ) w ;
43
43
while (* p ) /* Scan byte-by-byte until the null terminator. */
44
44
p ++ ;
45
- return (int32_t ) (p - s ); /* Return total length. */
45
+ return (size_t ) (p - s ); /* Return total length. */
46
46
}
47
47
48
48
void * memcpy (void * dst , const void * src , uint32_t len )
You can’t perform that action at this time.
0 commit comments