summaryrefslogtreecommitdiff
path: root/src/string
diff options
context:
space:
mode:
Diffstat (limited to 'src/string')
-rw-r--r--src/string/memccpy.c28
-rw-r--r--src/string/strdup.c22
2 files changed, 0 insertions, 50 deletions
diff --git a/src/string/memccpy.c b/src/string/memccpy.c
deleted file mode 100644
index c722ba7d..00000000
--- a/src/string/memccpy.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <string.h>
-#include "_safety.h"
-
-void *memccpy(void * restrict s1, const void * restrict s2, int c, size_t n)
-{
- SIGNAL_SAFE(0);
-
- unsigned char *dst = s1;
- const unsigned char *src = s2;
- size_t i = 0;
-
- ASSERT_NOOVERLAP(s1, s2, n);
-
- for (i = 0; i < n; i++) {
- dst[i] = src[i];
- if (dst[i] == (unsigned char)c) {
- return dst + i + 1;
- }
- }
-
- return NULL;
-}
-
-__check_4(void *, 0, memccpy, void * restrict, const void * restrict, int, size_t)
-
-/*
-XOPEN(4)
-*/
diff --git a/src/string/strdup.c b/src/string/strdup.c
deleted file mode 100644
index ecd671db..00000000
--- a/src/string/strdup.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <string.h>
-#include <stdlib.h>
-#include "_safety.h"
-
-char * strdup(const char *s)
-{
- SIGNAL_SAFE(0);
-
- size_t len = strlen(s);
- char *ret = malloc(len + 1);
- if (ret) {
- strcpy(ret, s);
- }
- return ret;
-}
-
-__check_1(char *, 0, strdup, const char *)
-
-/*
-XOPEN(400)
-POSIX(200809)
-*/