summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util/corestr.cpp17
-rw-r--r--src/lib/util/corestr.h8
2 files changed, 0 insertions, 25 deletions
diff --git a/src/lib/util/corestr.cpp b/src/lib/util/corestr.cpp
index b9e56c5cdc5..a2fef33a87a 100644
--- a/src/lib/util/corestr.cpp
+++ b/src/lib/util/corestr.cpp
@@ -119,23 +119,6 @@ bool core_iswildstr(const char *sp)
/*-------------------------------------------------
- core_strdup - string duplication via malloc
--------------------------------------------------*/
-
-char *core_strdup(const char *str)
-{
- char *cpy = nullptr;
- if (str != nullptr)
- {
- cpy = (char *)malloc(strlen(str) + 1);
- if (cpy != nullptr)
- strcpy(cpy, str);
- }
- return cpy;
-}
-
-
-/*-------------------------------------------------
std::string helpers
-------------------------------------------------*/
diff --git a/src/lib/util/corestr.h b/src/lib/util/corestr.h
index f4d8d7bed09..4df0a5ae812 100644
--- a/src/lib/util/corestr.h
+++ b/src/lib/util/corestr.h
@@ -49,14 +49,6 @@ int core_strnicmp(const char *s1, const char *s2, size_t n);
#define strncasecmp MUST_USE_CORE_STRNICMP_INSTEAD
-/* since strdup is not part of the standard, we use this instead - free with free() */
-char *core_strdup(const char *str);
-
-/* this macro prevents people from using strdup directly */
-#undef strdup
-#define strdup MUST_USE_CORE_STRDUP_INSTEAD
-
-
/* additional string compare helper (up to 16 characters at the moment) */
int core_strwildcmp(const char *sp1, const char *sp2);
bool core_iswildstr(const char *sp);