From a27c0255e7b8e6aab1b91e49fd7870d1ee4e1a80 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 15 Dec 2020 17:53:29 +0100 Subject: Remap ENOMEM from PROJ_ERR_INVALID_OP to PROJ_ERR_OTHER --- src/4D_api.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/4D_api.cpp') diff --git a/src/4D_api.cpp b/src/4D_api.cpp index 556a8c2d..7423240f 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -787,7 +787,7 @@ PJ *pj_create_internal (PJ_CONTEXT *ctx, const char *definition) { n = strlen (definition); args = (char *) malloc (n + 1); if (nullptr==args) { - proj_context_errno_set(ctx, PROJ_ERR_INVALID_OP /*ENOMEM*/); + proj_context_errno_set(ctx, PROJ_ERR_OTHER /*ENOMEM*/); return nullptr; } strcpy (args, definition); @@ -802,7 +802,7 @@ PJ *pj_create_internal (PJ_CONTEXT *ctx, const char *definition) { argv = pj_trim_argv (argc, args); if (!argv) { free(args); - proj_context_errno_set(ctx, PROJ_ERR_INVALID_OP /*ENOMEM*/); + proj_context_errno_set(ctx, PROJ_ERR_OTHER /*ENOMEM*/); return nullptr; } @@ -872,7 +872,7 @@ Same as proj_create_argv() but calls pj_create_internal() instead of proj_create /* We assume that free format is used, and build a full proj_create compatible string */ c = pj_make_args (argc, argv); if (nullptr==c) { - proj_context_errno_set(ctx, PROJ_ERR_INVALID_OP /*ENOMEM*/); + proj_context_errno_set(ctx, PROJ_ERR_OTHER /*ENOMEM*/); return nullptr; } -- cgit v1.2.3