aboutsummaryrefslogtreecommitdiff
path: root/src/4D_api.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-12-15 17:53:29 +0100
committerEven Rouault <even.rouault@spatialys.com>2020-12-15 17:53:29 +0100
commita27c0255e7b8e6aab1b91e49fd7870d1ee4e1a80 (patch)
treed1ef799526f06828328b58ce8ee92c028f723b6a /src/4D_api.cpp
parentb020666081223adb8a623e6b3ad2c6a3b2ce077a (diff)
downloadPROJ-a27c0255e7b8e6aab1b91e49fd7870d1ee4e1a80.tar.gz
PROJ-a27c0255e7b8e6aab1b91e49fd7870d1ee4e1a80.zip
Remap ENOMEM from PROJ_ERR_INVALID_OP to PROJ_ERR_OTHER
Diffstat (limited to 'src/4D_api.cpp')
-rw-r--r--src/4D_api.cpp6
1 files changed, 3 insertions, 3 deletions
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;
}