diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-01-30 15:29:55 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-01-30 15:29:55 -0500 |
commit | 9b6f6642ee252a9bedbe267fd85376fc9359c74f (patch) | |
tree | 5676ac47d416ef56b8134d94df49110abc53998f /src/string/strdup.c | |
parent | 7f9129145f2293cb8c9052ff1f395226421b0ae4 (diff) |
update standard and safety checks
Diffstat (limited to 'src/string/strdup.c')
-rw-r--r-- | src/string/strdup.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/string/strdup.c b/src/string/strdup.c index 7b97f75d..26362e2f 100644 --- a/src/string/strdup.c +++ b/src/string/strdup.c @@ -1,10 +1,12 @@ -#if 0 - #include <string.h> #include <stdlib.h> +#include "_safety.h" +#undef strdup char * strdup(const char *s) { + SIGNAL_SAFE(0); + size_t len = strlen(s); char *ret = malloc(len + 1); if (ret) { @@ -17,6 +19,3 @@ char * strdup(const char *s) XOPEN(400) POSIX(200809) */ - - -#endif |