Skip to content

Commit

Permalink
Code formatting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
dcommander committed Nov 18, 2017
1 parent 78e97e3 commit 9d9d8fe
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion jcdctmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ compute_reciprocal (UINT16 divisor, DCTELEM *dtbl)
#endif
dtbl[DCTSIZE2 * 3] = (DCTELEM) r - sizeof(DCTELEM)*8; /* shift */

if(r <= 16) return 0;
if (r <= 16) return 0;
else return 1;
}

Expand Down
4 changes: 2 additions & 2 deletions jcstest.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int main(void)
jerr.pub.error_exit = my_error_exit;
jerr.pub.output_message = my_output_message;

if(setjmp(jerr.jb)) {
if (setjmp(jerr.jb)) {
/* this will execute if libjpeg has an error */
jcs_valid = 0;
goto done;
Expand All @@ -104,7 +104,7 @@ int main(void)
printf(" Not present at compile time\n");
#endif

if(setjmp(jerr.jb)) {
if (setjmp(jerr.jb)) {
/* this will execute if libjpeg has an error */
jcs_alpha_valid = 0;
goto done2;
Expand Down
2 changes: 1 addition & 1 deletion jdatadst-tj.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ term_mem_destination (j_compress_ptr cinfo)
{
my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest;

if(dest->alloc) *dest->outbuffer = dest->buffer;
if (dest->alloc) *dest->outbuffer = dest->buffer;
*dest->outsize = (unsigned long)(dest->bufsize - dest->pub.free_in_buffer);
}

Expand Down
2 changes: 1 addition & 1 deletion jdcolor.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ static const JLONG dither_matrix[4] = {
static INLINE boolean is_big_endian(void)
{
int test_value = 1;
if(*(char *)&test_value != 1)
if (*(char *)&test_value != 1)
return TRUE;
return FALSE;
}
Expand Down
2 changes: 1 addition & 1 deletion jdmerge.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ static const JLONG dither_matrix[4] = {
static INLINE boolean is_big_endian(void)
{
int test_value = 1;
if(*(char *)&test_value != 1)
if (*(char *)&test_value != 1)
return TRUE;
return FALSE;
}
Expand Down
6 changes: 3 additions & 3 deletions wrbmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ LOCAL(void) write_colormap
static INLINE boolean is_big_endian(void)
{
int test_value = 1;
if(*(char *)&test_value != 1)
if (*(char *)&test_value != 1)
return TRUE;
return FALSE;
}
Expand Down Expand Up @@ -104,7 +104,7 @@ put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo,
inptr = dest->pub.buffer[0];
outptr = image_ptr[0];

if(cinfo->out_color_space == JCS_RGB565) {
if (cinfo->out_color_space == JCS_RGB565) {
boolean big_endian = is_big_endian();
unsigned short *inptr2 = (unsigned short *)inptr;
for (col = cinfo->output_width; col > 0; col--) {
Expand Down Expand Up @@ -447,7 +447,7 @@ jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2)
dest->pub.put_pixel_rows = put_gray_rows;
else
dest->pub.put_pixel_rows = put_pixel_rows;
} else if(cinfo->out_color_space == JCS_RGB565 ) {
} else if (cinfo->out_color_space == JCS_RGB565) {
dest->pub.put_pixel_rows = put_pixel_rows;
} else {
ERREXIT(cinfo, JERR_BMP_COLORSPACE);
Expand Down

0 comments on commit 9d9d8fe

Please sign in to comment.