shithub: jbig2

Download patch

ref: ceb71749c865a4a4cd4c5a6ed0b052dff533a76c
parent: fdefccb83e29b399d3c3935ed2ada533fb57bdd0
author: Ralph Giles <giles@ghostscript.com>
date: Tue Mar 31 17:32:38 EDT 2009

Rename a local variable to avoid shadowing a function argument.

The code was correct, but confusing. Resolves a Coverity warning.

--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -290,7 +290,7 @@
 		Jbig2RefinementRegionParams rparams;
 		Jbig2Image *IBO;
 		int32_t RDW, RDH, RDX, RDY;
-		Jbig2Image *image;
+		Jbig2Image *refimage;
 		int BMSIZE = 0;
 
 		/* 6.4.11 (1, 2, 3, 4) */
@@ -310,8 +310,8 @@
 
 		/* 6.4.11 (6) */
 		IBO = IB;
-		image = jbig2_image_new(ctx, IBO->width + RDW,
-					     IBO->height + RDH);
+		refimage = jbig2_image_new(ctx, IBO->width + RDW,
+						IBO->height + RDH);
 
 		/* Table 12 */
 		rparams.GRTEMPLATE = params->SBRTEMPLATE;
@@ -321,8 +321,8 @@
 		rparams.TPGRON = 0;
 		memcpy(rparams.grat, params->sbrat, 4);
 		jbig2_decode_refinement_region(ctx, segment,
-		    &rparams, as, image, GR_stats);
-		IB = image;
+		    &rparams, as, refimage, GR_stats);
+		IB = refimage;
 
 		jbig2_image_release(ctx, IBO);