aboutsummaryrefslogtreecommitdiff
path: root/src/param.cpp
diff options
context:
space:
mode:
authorKristian Evers <kristianevers@gmail.com>2020-11-20 16:37:12 +0100
committerKristian Evers <kristianevers@gmail.com>2020-11-20 16:40:40 +0100
commit046270a85faf20f38d01e02942d197db74bb8542 (patch)
treef95cc5511d3de0d76070553c3a0b04d71f545c0e /src/param.cpp
parent56f0ad70054eea15e9671cd67aafd14bf7c11c74 (diff)
downloadPROJ-046270a85faf20f38d01e02942d197db74bb8542.tar.gz
PROJ-046270a85faf20f38d01e02942d197db74bb8542.zip
Remove old pj_ memory (de)allocation functions
Gone are pj_malloc, pj_calloc, pj_dalloc and pj_dealloc. Their primary function as API memory functions in proj_api.h is no longer there and the other use as a workaround for old errno problems is no longer valid either. Replaced with malloc and free across the codebase.
Diffstat (limited to 'src/param.cpp')
-rw-r--r--src/param.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/param.cpp b/src/param.cpp
index 3e13b391..28d6bc3e 100644
--- a/src/param.cpp
+++ b/src/param.cpp
@@ -38,7 +38,7 @@ static void unquote_string(char* param_str) {
paralist *pj_mkparam(const char *str) {
paralist *newitem;
- if((newitem = (paralist *)pj_malloc(sizeof(paralist) + strlen(str))) != nullptr) {
+ if((newitem = (paralist *)malloc(sizeof(paralist) + strlen(str))) != nullptr) {
newitem->used = 0;
newitem->next = nullptr;
if (*str == '+')
@@ -82,7 +82,7 @@ paralist *pj_mkparam_ws (const char *str, const char **next_str) {
*next_str = str + len;
/* Use calloc to automagically 0-terminate the copy */
- newitem = (paralist *) pj_calloc (1, sizeof(paralist) + len + 1);
+ newitem = (paralist *) calloc (1, sizeof(paralist) + len + 1);
if (nullptr==newitem)
return nullptr;
memcpy(newitem->param, str, len);