aboutsummaryrefslogtreecommitdiff
path: root/src/geod_set.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-03-12 23:32:03 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-03-14 20:25:12 +0100
commita49738902a27624d835e5a6b9983a9803c322996 (patch)
tree8f0a7e5302e12ee0b3044a7b87ca2de6bbdfbc27 /src/geod_set.c
parentcde489ce64556e0ad5fa5da64bcb8fd88aee4c39 (diff)
downloadPROJ-a49738902a27624d835e5a6b9983a9803c322996.tar.gz
PROJ-a49738902a27624d835e5a6b9983a9803c322996.zip
Fix (mostly false positive) clang static analyzer warnings about potential null pointer dereference
Diffstat (limited to 'src/geod_set.c')
-rw-r--r--src/geod_set.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/geod_set.c b/src/geod_set.c
index 26a86b61..571a7d20 100644
--- a/src/geod_set.c
+++ b/src/geod_set.c
@@ -19,7 +19,7 @@ geod_set(int argc, char **argv) {
start = curr = pj_mkparam(argv[0]);
if (!curr)
emess(1, "memory allocation failed");
- for (i = 1; i < argc; ++i) {
+ for (i = 1; curr != 0 && i < argc; ++i) {
curr->next = pj_mkparam(argv[i]);
if (!curr->next)
emess(1, "memory allocation failed");