From 046270a85faf20f38d01e02942d197db74bb8542 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Fri, 20 Nov 2020 16:37:12 +0100 Subject: 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. --- src/pr_list.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/pr_list.cpp') diff --git a/src/pr_list.cpp b/src/pr_list.cpp index 77db5bfb..30fc6571 100644 --- a/src/pr_list.cpp +++ b/src/pr_list.cpp @@ -66,7 +66,7 @@ char *pj_get_def( PJ *P, int options ) size_t def_max = 10; (void) options; - definition = (char *) pj_malloc(def_max); + definition = (char *) malloc(def_max); if (!definition) return nullptr; definition[0] = '\0'; @@ -84,14 +84,14 @@ char *pj_get_def( PJ *P, int options ) char *def2; def_max = def_max * 2 + l + 5; - def2 = (char *) pj_malloc(def_max); + def2 = (char *) malloc(def_max); if (def2) { strcpy( def2, definition ); - pj_dalloc( definition ); + free( definition ); definition = def2; } else { - pj_dalloc( definition ); + free( definition ); return nullptr; } } -- cgit v1.2.3