diff options
| author | Mistivia <i@mistivia.com> | 2025-11-05 15:34:49 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-11-05 15:34:49 +0800 |
| commit | 95caa5bdaff4e5b5a924a9141b51c756a57abc0f (patch) | |
| tree | bb0ff8eddfe8a06558317464cea14405e76b7ebc /deprecated-ngircd/src/portab/strdup.c | |
| parent | 8532af453ccc9071ddc919b063788d6b496af991 (diff) | |
remove deprecated
Diffstat (limited to 'deprecated-ngircd/src/portab/strdup.c')
| -rw-r--r-- | deprecated-ngircd/src/portab/strdup.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/deprecated-ngircd/src/portab/strdup.c b/deprecated-ngircd/src/portab/strdup.c deleted file mode 100644 index adb19e7..0000000 --- a/deprecated-ngircd/src/portab/strdup.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ngIRCd -- The Next Generation IRC Daemon - */ - -#include "portab.h" - -/** - * @file - * strdup() implementation. Public domain. - */ - -#ifndef HAVE_STRDUP - -#include <string.h> -#include <stdlib.h> -#include <sys/types.h> - -GLOBAL char * -strdup(const char *s) -{ - char *dup; - size_t len = strlen(s); - size_t alloc = len + 1; - - if (len >= alloc) - return NULL; - dup = malloc(alloc); - if (dup) - strlcpy(dup, s, alloc ); - - return dup; -} - -#endif |
