aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jniproj.c4
-rw-r--r--src/pj_init.c2
-rw-r--r--src/pj_malloc.c14
3 files changed, 11 insertions, 9 deletions
diff --git a/src/jniproj.c b/src/jniproj.c
index 33a4cbf8..ebac726e 100644
--- a/src/jniproj.c
+++ b/src/jniproj.c
@@ -124,7 +124,7 @@ JNIEXPORT jstring JNICALL Java_org_proj4_Projections_getProjInfo
if (!(pj = pj_init_plus(proj_def)))
exit(1);
- // put together all the info of the projection and free the pointer to pjdesc
+ /* put together all the info of the projection and free the pointer to pjdesc */
pjdesc = pj_get_def(pj, 0);
strcpy(info,pjdesc);
pj_dalloc(pjdesc);
@@ -160,7 +160,7 @@ JNIEXPORT jstring JNICALL Java_org_proj4_Projections_getEllipsInfo
if (!(pj = pj_init_plus(proj_def)))
exit(1);
- // put together all the info of the ellipsoid
+ /* put together all the info of the ellipsoid */
/* sprintf(temp,"name: %s;", pj->descr); */
sprintf(temp,"name: not available;");
strcpy(ellipseinfo,temp);
diff --git a/src/pj_init.c b/src/pj_init.c
index 2b649549..bffbf786 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -323,7 +323,7 @@ pj_init_ctx(projCtx ctx, int argc, char **argv) {
/* vertical datum geoid grids */
PIN->has_geoid_vgrids = pj_param(ctx, start, "tgeoidgrids").i;
- if( PIN->has_geoid_vgrids ) // we need to mark it as used.
+ if( PIN->has_geoid_vgrids ) /* we need to mark it as used. */
pj_param(ctx, start, "sgeoidgrids");
/* longitude center for wrapping */
diff --git a/src/pj_malloc.c b/src/pj_malloc.c
index b6400eba..80443a2b 100644
--- a/src/pj_malloc.c
+++ b/src/pj_malloc.c
@@ -7,12 +7,14 @@
void *
pj_malloc(size_t size) {
-// Currently, pj_malloc is a hack to solve an errno problem.
-// The problem is described in more details at
-// https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86420.
-// It seems, that pj_init and similar functions incorrectly
-// (under debian/glibs-2.3.2) assume that pj_malloc resets
-// errno after success. pj_malloc tries to mimic this.
+/*
+/ Currently, pj_malloc is a hack to solve an errno problem.
+/ The problem is described in more details at
+/ https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86420.
+/ It seems, that pj_init and similar functions incorrectly
+/ (under debian/glibs-2.3.2) assume that pj_malloc resets
+/ errno after success. pj_malloc tries to mimic this.
+*/
int old_errno = errno;
void *res = malloc(size);
if ( res && !old_errno )