Skip to content

Commit

Permalink
Merge pull request #118 from radarhere/pre-commit-clang
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Apr 28, 2024
2 parents 1420e72 + fd8c6a6 commit aa34ca7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ BinPackParameters: false
BreakBeforeBraces: Attach
ColumnLimit: 88
DerivePointerAlignment: false
IndentGotoLabels: false
IndentWidth: 4
Language: Cpp
PointerAlignment: Right
Expand Down
16 changes: 8 additions & 8 deletions src/libImaging/GifEncode.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ glzwe(
UINT32 end_of_data) {
switch (st->entry_state) {
case LZW_TRY_IN1:
get_first_byte:
get_first_byte:
if (!*in_avail) {
if (end_of_data) {
goto end_of_data;
Expand All @@ -94,7 +94,7 @@ glzwe(
(*in_avail)--;

case LZW_TRY_IN2:
encode_loop:
encode_loop:
if (!*in_avail) {
if (end_of_data) {
st->code = st->head;
Expand Down Expand Up @@ -127,7 +127,7 @@ glzwe(
st->code = st->head;
st->put_state = PUT_HEAD;
goto put_code;
insert_code_or_clear: /* jump here after put_code */
insert_code_or_clear: /* jump here after put_code */
if (st->next_code < CODE_LIMIT) {
st->codes[st->probe] =
(st->next_code << 20) | (st->head << 8) | st->tail;
Expand All @@ -140,7 +140,7 @@ glzwe(
st->code = st->clear_code;
st->put_state = PUT_CLEAR;
goto put_code;
reset_after_clear: /* jump here after put_code */
reset_after_clear: /* jump here after put_code */
glzwe_reset(st);
}
st->head = st->tail;
Expand All @@ -150,9 +150,9 @@ glzwe(
glzwe_reset(st);
st->code = st->clear_code;
st->put_state = PUT_INIT_CLEAR;
put_code:
put_code:
st->code_bits_left = st->code_width;
check_buf_bits:
check_buf_bits:
if (!st->buf_bits_left) { /* out buffer full */

case LZW_TRY_OUT1:
Expand Down Expand Up @@ -190,11 +190,11 @@ glzwe(
return GLZW_INTERNAL_ERROR;
}

end_of_data:
end_of_data:
st->code = st->end_code;
st->put_state = PUT_END;
goto put_code;
flush_code_buffer: /* jump here after put_code */
flush_code_buffer: /* jump here after put_code */
if (st->buf_bits_left < 8) {
case LZW_TRY_OUT2:
if (!*out_avail) {
Expand Down
2 changes: 1 addition & 1 deletion src/libImaging/JpegEncode.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ ImagingJpegEncode(Imaging im, ImagingCodecState state, UINT8 *buf, int bytes) {
}
jpeg_finish_compress(&context->cinfo);

cleanup:
cleanup:
/* Clean up */
if (context->comment) {
free(context->comment);
Expand Down

0 comments on commit aa34ca7

Please sign in to comment.