summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-11-11 14:34:46 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-11-11 16:12:01 +0100
commit7c765ea14785a4ad6efd2e30e03447f354bed6b4 (patch)
tree8c1e3836d1c907378f61bb5748aac4219af68ce4 /src/lib
parent5c0edceec3a939ce7804b23beaeebfc700413489 (diff)
No need for osd_malloc, osd_malloc_array and osd_free (nw)
MALLOC_DEBUG not applicable anymore since we use new to allocate in 99.9% of cases
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util/corefile.cpp2
-rw-r--r--src/lib/util/corestr.cpp4
-rw-r--r--src/lib/util/corestr.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index 76b788174ab..264d80f4113 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -1207,7 +1207,7 @@ osd_file::error core_file::load(std::string const &filename, void **data, std::u
return osd_file::error::OUT_OF_MEMORY;
// allocate memory
- *data = osd_malloc(size);
+ *data = malloc(size);
length = std::uint32_t(size);
// read the data
diff --git a/src/lib/util/corestr.cpp b/src/lib/util/corestr.cpp
index ed9c8e77b0a..4431f6d08ac 100644
--- a/src/lib/util/corestr.cpp
+++ b/src/lib/util/corestr.cpp
@@ -109,7 +109,7 @@ int core_strwildcmp(const char *sp1, const char *sp2)
/*-------------------------------------------------
- core_strdup - string duplication via osd_malloc
+ core_strdup - string duplication via malloc
-------------------------------------------------*/
char *core_strdup(const char *str)
@@ -117,7 +117,7 @@ char *core_strdup(const char *str)
char *cpy = nullptr;
if (str != nullptr)
{
- cpy = (char *)osd_malloc_array(strlen(str) + 1);
+ cpy = (char *)malloc(strlen(str) + 1);
if (cpy != nullptr)
strcpy(cpy, str);
}
diff --git a/src/lib/util/corestr.h b/src/lib/util/corestr.h
index 29f98d06dc6..1e12c0d0e24 100644
--- a/src/lib/util/corestr.h
+++ b/src/lib/util/corestr.h
@@ -49,7 +49,7 @@ 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 osd_free() */
+/* 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 */