Merge pull request #1373 from DimitriPapadopoulos/lgtm
authorEven Rouault <even.rouault@spatialys.com>
Mon, 30 Aug 2021 17:15:32 +0000 (19:15 +0200)
committerGitHub <noreply@github.com>
Mon, 30 Aug 2021 17:15:32 +0000 (19:15 +0200)
LGTM warning: Comparison result is always the same

src/lib/openjp2/pi.c

index 4f7dd50f16d24c709153639c4bed19cabf3da322..ccc5b75cf563f8c7f10a2c1a81baf880ed50f4e3 100644 (file)
@@ -1312,7 +1312,7 @@ static OPJ_BOOL opj_pi_check_next_level(OPJ_INT32 pos,
     opj_poc_t *tcp = &tcps->pocs[pino];
 
     if (pos >= 0) {
-        for (i = pos; pos >= 0; i--) {
+        for (i = pos; i >= 0; i--) {
             switch (prog[i]) {
             case 'R':
                 if (tcp->res_t == tcp->resE) {