Skip to content

Commit

Permalink
Change comment style
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Murray <[email protected]>
  • Loading branch information
hugovk and radarhere committed Apr 30, 2024
1 parent e68db6c commit 80e57be
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/libImaging/FliDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t byt
}
/* Note, have to check Data + size, not just ptr + size) */
if (data + (state->xsize * state->ysize) > ptr + bytes) {
/* not enough data for frame */
/* UNDONE Unclear that we're actually going to leave the buffer at the right place. */
// not enough data for frame.
// UNDONE Unclear that we're actually going to leave the buffer at
// the right place.
return ptr - buf; /* bytes consumed */
}
for (y = 0; y < state->ysize; y++) {
Expand Down
6 changes: 3 additions & 3 deletions src/libImaging/GifEncode.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ static int glzwe(GIFENCODERSTATE *st, const UINT8 *in_ptr, UINT8 *out_ptr,
st->head = st->codes[st->probe] >> 20;
goto encode_loop;
} else {
/* Reprobe decrement must be non-zero and relatively prime to table
* size. So, any odd positive number for power-of-2 size. */
if ((st->probe -= ((st->tail << 2) | 1)) < 0) {
// Reprobe decrement must be non-zero and relatively prime to table
// size. So, any odd positive number for power-of-2 size.
if ((st->probe -= ((st->tail << 2) | 1)) < 0) {
st->probe += TABLE_SIZE;
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/libImaging/TiffDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ _decodeTile(Imaging im, ImagingCodecState state, TIFF *tiff, int planes, Imaging

if (tile_bytes_size > ((tile_length * state->bits / planes + 7) / 8) * tile_width) {
// If the tile size as expected by LibTiff isn't what we're expecting, abort.
// man: TIFFTileSize returns the equivalent size for a tile of data as it would be returned in a
// call to TIFFReadTile ...
// man: TIFFTileSize returns the equivalent size for a tile of data as it
// would be returned in a call to TIFFReadTile ...
state->errcode = IMAGING_CODEC_BROKEN;
return -1;
}
Expand Down Expand Up @@ -478,8 +478,8 @@ _decodeStrip(Imaging im, ImagingCodecState state, TIFF *tiff, int planes, Imagin
unpacker_row_byte_size = (state->xsize * state->bits / planes + 7) / 8;
if (strip_size > (unpacker_row_byte_size * rows_per_strip)) {
// If the strip size as expected by LibTiff isn't what we're expecting, abort.
// man: TIFFStripSize returns the equivalent size for a strip of data as it would be returned in a
// call to TIFFReadEncodedStrip ...
// man: TIFFStripSize returns the equivalent size for a strip of data as it
// would be returned in a call to TIFFReadEncodedStrip ...
state->errcode = IMAGING_CODEC_BROKEN;
return -1;
}
Expand Down

0 comments on commit 80e57be

Please sign in to comment.