[devel] Added some white space in pngvalid.c

This commit is contained in:
Glenn Randers-Pehrson 2010-12-07 16:13:22 -06:00
parent 9f044c17fa
commit 6735058024

View File

@ -1059,10 +1059,10 @@ set_store_for_read(png_store *ps, png_infopp ppi, png_uint_32 id,
store_read_reset(ps); store_read_reset(ps);
/* Both the create APIs can return NULL if used in their default mode /* Both the create APIs can return NULL if used in their default mode
* (because there is no other way of handling an error because the jmp_buf by * (because there is no other way of handling an error because the jmp_buf
* default is stored in png_struct and that has not been allocated!) * by default is stored in png_struct and that has not been allocated!)
* However, given that store_error works correctly in these circumstances we * However, given that store_error works correctly in these circumstances
* don't ever expect NULL in this program. * we don't ever expect NULL in this program.
*/ */
if (ps->speed) if (ps->speed)
ps->pread = png_create_read_struct(PNG_LIBPNG_VER_STRING, ps, ps->pread = png_create_read_struct(PNG_LIBPNG_VER_STRING, ps,
@ -1472,15 +1472,15 @@ modifier_read_imp(png_modifier *pm, png_bytep pb, png_size_t st)
} }
/* Don't do any further processing if the buffer was modified - /* Don't do any further processing if the buffer was modified -
* otherwise the code will end up modifying a chunk that was just * otherwise the code will end up modifying a chunk that was
* added. * just added.
*/ */
if (mod != NULL) if (mod != NULL)
break; /* out of switch */ break; /* out of switch */
} }
/* If we get to here then this chunk may need to be modified. To do /* If we get to here then this chunk may need to be modified. To
* this it must be less than 1024 bytes in total size, otherwise * do this it must be less than 1024 bytes in total size, otherwise
* it just gets flushed. * it just gets flushed.
*/ */
if (len+12 <= sizeof pm->buffer) if (len+12 <= sizeof pm->buffer)
@ -1566,9 +1566,9 @@ modifier_progressive_read(png_modifier *pm, png_structp pp, png_infop pi)
/* This is another Horowitz and Hill random noise generator. In this case /* This is another Horowitz and Hill random noise generator. In this case
* the aim is to stress the progressive reader with truely horrible variable * the aim is to stress the progressive reader with truely horrible variable
* buffer sizes in the range 1..500, so a sequence of 9 bit random numbers is * buffer sizes in the range 1..500, so a sequence of 9 bit random numbers
* generated. We could probably just count from 1 to 32767 and get as good * is generated. We could probably just count from 1 to 32767 and get as
* a result. * good a result.
*/ */
for (;;) for (;;)
{ {
@ -3527,7 +3527,7 @@ perform_gamma_test(png_modifier *pm, int speed, int summary)
/* main program */ /* main program */
int main(int argc, PNG_CONST char **argv) int main(int argc, PNG_CONST char **argv)
{ {
volatile int summary = 1; /* Print the error sumamry at the end */ volatile int summary = 1; /* Print the error summary at the end */
/* Create the given output file on success: */ /* Create the given output file on success: */
PNG_CONST char *volatile touch = NULL; PNG_CONST char *volatile touch = NULL;
@ -3552,8 +3552,8 @@ int main(int argc, PNG_CONST char **argv)
if (pm.this.image != NULL) if (pm.this.image != NULL)
{ {
/* Ignore OOM at this point - the 'ensure' routine above will allocate the /* Ignore OOM at this point - the 'ensure' routine above will allocate
* array appropriately. * the array appropriately.
*/ */
++(pm.this.image); ++(pm.this.image);
pm.this.cb_image = 2*STD_IMAGEMAX; pm.this.cb_image = 2*STD_IMAGEMAX;
@ -3589,7 +3589,7 @@ int main(int argc, PNG_CONST char **argv)
* maximum 16 bit error is about +/-1.9 in the fixed point implementation but * maximum 16 bit error is about +/-1.9 in the fixed point implementation but
* this is only allowed for values >38149 by the following: * this is only allowed for values >38149 by the following:
*/ */
pm.maxpc16 = .005; /* I.e. 1/200% - 1/20000 */ pm.maxpc16 = .005; /* I.e., 1/200% - 1/20000 */
/* Now parse the command line options. */ /* Now parse the command line options. */
while (--argc >= 1) while (--argc >= 1)