summaryrefslogtreecommitdiff
path: root/src/libstddjb/byte_count.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/byte_count.c')
-rw-r--r--src/libstddjb/byte_count.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstddjb/byte_count.c b/src/libstddjb/byte_count.c
index 5e3f8af..a09e044 100644
--- a/src/libstddjb/byte_count.c
+++ b/src/libstddjb/byte_count.c
@@ -1,10 +1,11 @@
/* ISC license. */
+#include <sys/types.h>
#include <skalibs/bytestr.h>
-unsigned int byte_count (register char const *s, register unsigned int len, register char b)
+size_t byte_count (char const *s, size_t len, char b)
{
- register unsigned int n = 0 ;
+ size_t n = 0 ;
while (len--) if (*s++ == b) n++ ;
return n ;
}