summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/string.c b/string.c
index 07082e5..dbce231 100644
--- a/string.c
+++ b/string.c
@@ -2,7 +2,7 @@
#include "defs.h"
void *
-memset(void *dst, int c, unsigned n)
+memset(void *dst, int c, uint n)
{
char *d = (char *) dst;
@@ -13,7 +13,7 @@ memset(void *dst, int c, unsigned n)
}
int
-memcmp(const void *v1, const void *v2, unsigned n)
+memcmp(const void *v1, const void *v2, uint n)
{
const uint8_t *s1 = (const uint8_t *) v1;
const uint8_t *s2 = (const uint8_t *) v2;
@@ -28,7 +28,7 @@ memcmp(const void *v1, const void *v2, unsigned n)
}
void *
-memmove(void *dst, const void *src, unsigned n)
+memmove(void *dst, const void *src, uint n)
{
const char *s;
char *d;
@@ -48,14 +48,14 @@ memmove(void *dst, const void *src, unsigned n)
}
int
-strncmp(const char *p, const char *q, unsigned n)
+strncmp(const char *p, const char *q, uint n)
{
while (n > 0 && *p && *p == *q)
n--, p++, q++;
if (n == 0)
return 0;
else
- return (int) ((unsigned char) *p - (unsigned char) *q);
+ return (int) ((uint8_t) *p - (uint8_t) *q);
}
// Memcpy is deprecated and should NOT be called.
@@ -64,7 +64,7 @@ strncmp(const char *p, const char *q, unsigned n)
// Memcpy is here only because gcc compiles some
// structure assignments into calls to memcpy.
void *
-memcpy(void *dst, void *src, unsigned n)
+memcpy(void *dst, void *src, uint n)
{
char *d = (char *) dst;
char *s = (char *) src;