summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-01-24 21:06:25 -0500
committer AJR <ajrhacker@users.noreply.github.com>2018-01-24 21:06:25 -0500
commit57bd62a1fbd890d2bb546acea9c52dcb1e56a7ec (patch)
tree1656bc5b83717f2b98dd9e75a1332bcb5ac42caa /src/lib
parente6b81449f8515d3e102d6940ab74b59b4a37869d (diff)
Eliminate core_strdup (nw)
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);