aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-03-12 20:57:50 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-03-12 20:57:50 +0100
commit45433be5745644f22e2fc5f6d64b029d9e5aa772 (patch)
tree62e55adc14f7dfcc3c13e6a07a4d42cf1c634c92 /src
parentcca88007d3425cfc9d0eabb0b12956e899193727 (diff)
downloadPROJ-45433be5745644f22e2fc5f6d64b029d9e5aa772.tar.gz
PROJ-45433be5745644f22e2fc5f6d64b029d9e5aa772.zip
Avoid cppcheck false positive 'Variable 'nadgrids' is assigned a value that is never used' and make code more readable
Diffstat (limited to 'src')
-rw-r--r--src/pj_datum_set.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pj_datum_set.c b/src/pj_datum_set.c
index f9027bb0..014941e5 100644
--- a/src/pj_datum_set.c
+++ b/src/pj_datum_set.c
@@ -86,7 +86,8 @@ int pj_datum_set(projCtx ctx, paralist *pl, PJ *projdef)
/* -------------------------------------------------------------------- */
/* Check for nadgrids parameter. */
/* -------------------------------------------------------------------- */
- if( (nadgrids = pj_param(ctx, pl,"snadgrids").s) != NULL )
+ nadgrids = pj_param(ctx, pl,"snadgrids").s;
+ if( nadgrids != NULL )
{
/* We don't actually save the value separately. It will continue
to exist int he param list for use in pj_apply_gridshift.c */