summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/strings/bcmp.c3
-rw-r--r--src/strings/bcopy.c4
-rw-r--r--src/strings/bzero.c5
3 files changed, 8 insertions, 4 deletions
diff --git a/src/strings/bcmp.c b/src/strings/bcmp.c
index 0686ebdf..052beb7c 100644
--- a/src/strings/bcmp.c
+++ b/src/strings/bcmp.c
@@ -1,8 +1,9 @@
+#include <string.h>
#include <strings.h>
int bcmp(const void *s1, const void *s2, size_t n)
{
- return 0;
+ return memcmp(s1, s2, n);
}
/*
diff --git a/src/strings/bcopy.c b/src/strings/bcopy.c
index 0de75234..a464db8e 100644
--- a/src/strings/bcopy.c
+++ b/src/strings/bcopy.c
@@ -1,8 +1,10 @@
+#include <string.h>
#include <strings.h>
int bcopy(const void *s1, void *s2, size_t n)
{
- return 0;
+ memcpy(s1, s2, n);
+ return n;
}
/*
diff --git a/src/strings/bzero.c b/src/strings/bzero.c
index 3d15579c..383d55c3 100644
--- a/src/strings/bzero.c
+++ b/src/strings/bzero.c
@@ -1,8 +1,9 @@
+#include <string.h>
#include <strings.h>
-void bzero(void*s, size_t n)
+void bzero(void* s, size_t n)
{
- return 0;
+ (void)memset(s, '\0', n);
}
/*