From e11b5da023febe3425e92cdfbf32ef586469fbb5 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 12 Mar 2018 21:04:16 +0100 Subject: Fix 'Either the condition 'fromProj!=0' is redundant or there is possible null pointer dereference: fromProj' cppcheck warning --- src/cs2cs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/cs2cs.c b/src/cs2cs.c index 730d37ee..b7e0ab7f 100644 --- a/src/cs2cs.c +++ b/src/cs2cs.c @@ -446,10 +446,8 @@ int main(int argc, char **argv) emess_dat.File_name = 0; } - if( fromProj != NULL ) - pj_free( fromProj ); - if( toProj != NULL ) - pj_free( toProj ); + pj_free( fromProj ); + pj_free( toProj ); pj_deallocate_grids(); -- cgit v1.2.3