summaryrefslogtreecommitdiff
path: root/deprecated-ngircd/src/portab/strndup.c
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-11-05 15:34:49 +0800
committerMistivia <i@mistivia.com>2025-11-05 15:34:49 +0800
commit95caa5bdaff4e5b5a924a9141b51c756a57abc0f (patch)
treebb0ff8eddfe8a06558317464cea14405e76b7ebc /deprecated-ngircd/src/portab/strndup.c
parent8532af453ccc9071ddc919b063788d6b496af991 (diff)
remove deprecated
Diffstat (limited to 'deprecated-ngircd/src/portab/strndup.c')
-rw-r--r--deprecated-ngircd/src/portab/strndup.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/deprecated-ngircd/src/portab/strndup.c b/deprecated-ngircd/src/portab/strndup.c
deleted file mode 100644
index d63b972..0000000
--- a/deprecated-ngircd/src/portab/strndup.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * ngIRCd -- The Next Generation IRC Daemon
- */
-
-#include "portab.h"
-
-/**
- * @file
- * strndup() implementation. Public domain.
- */
-
-#ifndef HAVE_STRNDUP
-
-#include <string.h>
-#include <stdlib.h>
-#include <sys/types.h>
-
-GLOBAL char *
-strndup(const char *s, size_t maxlen)
-{
- char *dup;
- size_t len = strlen(s);
-
- if (len > maxlen)
- len = maxlen;
- len++;
- dup = malloc(len);
- if (dup)
- strlcpy(dup, s, len);
-
- return dup;
-}
-
-#endif