]> granicus.if.org Git - libx264/commitdiff
checkasm: Use the right variable in a loop condition
authorMartin Storsjö <martin@martin.st>
Mon, 22 May 2017 10:10:46 +0000 (13:10 +0300)
committerHenrik Gramner <henrik@gramner.com>
Tue, 23 May 2017 14:57:44 +0000 (16:57 +0200)
Prior to this, this loop hasn't run at all. The condition has been
the same since it was introduced in 5b0cb86f.

This issue was pointed out by a clang warning.

tools/checkasm.c

index b367db67400282e71bf9a71dfb59b9ef81a33310..bc159fa520b55b21b0140e32233885e072f6c1ce 100644 (file)
@@ -2260,7 +2260,7 @@ static int check_quant( int cpu_ref, int cpu_new )
                     int max = X264_MIN( i, PIXEL_MAX*16 ); \
                     for( int j = 0; j < size; j++ ) \
                         dct1[j] = rand()%(max*2+1) - max; \
-                    for( int j = 0; i <= size; j += 4 ) \
+                    for( int j = 0; j <= size; j += 4 ) \
                         qf_c.quant_2x2_dc( &dct1[j], h->quant4_mf[CQM_4IC][qpdc][0]>>1, h->quant4_bias[CQM_4IC][qpdc][0]>>1 ); \
                     memcpy( dct2, dct1, size*sizeof(dctcoef) ); \
                     res_c   = call_c1( qf_c.optname, dct1, dmf ); \