From fb87c671f11b5a3a41828727a8b57f6c8397fc79 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 27 Feb 2020 23:12:53 +0100 Subject: Fix warnings of latest cppcheck master --- src/initcache.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/initcache.cpp') diff --git a/src/initcache.cpp b/src/initcache.cpp index 6120a406..af20fb82 100644 --- a/src/initcache.cpp +++ b/src/initcache.cpp @@ -54,10 +54,10 @@ paralist *pj_clone_paralist( const paralist *list) newitem->next = nullptr; strcpy( newitem->param, list->param ); - if( list_copy == nullptr ) - list_copy = newitem; - else + if( next_copy ) next_copy->next = newitem; + else + list_copy = newitem; next_copy = newitem; } -- cgit v1.2.3