From 44d70b8b253381c6c1b95f3acb4ad4cb81cc1132 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 22 May 2024 10:15:49 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/PIL/VtfImagePlugin.py | 1 + src/libImaging/Bcn.h | 6 +++--- src/libImaging/BcnDecode.c | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/PIL/VtfImagePlugin.py b/src/PIL/VtfImagePlugin.py index be2d35ff6..8aa9c4324 100644 --- a/src/PIL/VtfImagePlugin.py +++ b/src/PIL/VtfImagePlugin.py @@ -9,6 +9,7 @@ The contents of this file are hereby released in the public domain (CC0) Full text of the CC0 license: https://creativecommons.org/publicdomain/zero/1.0/ """ + from __future__ import annotations import struct diff --git a/src/libImaging/Bcn.h b/src/libImaging/Bcn.h index 3588828e8..5ab67a192 100644 --- a/src/libImaging/Bcn.h +++ b/src/libImaging/Bcn.h @@ -31,12 +31,12 @@ typedef struct { #define BIT_MASK(bit_count) ((1 << (bit_count)) - 1) #define SET_BITS(target, bit_offset, bit_count, value) \ - target |= (((value)&BIT_MASK(bit_count)) << (bit_offset)) + target |= (((value) & BIT_MASK(bit_count)) << (bit_offset)) #define GET_BITS(source, bit_offset, bit_count) \ ((source) & (BIT_MASK(bit_count) << (bit_offset))) >> (bit_offset) #define SWAP(TYPE, A, B) \ do { \ TYPE TMP = A; \ - (A) = B; \ - (B) = TMP; \ + (A) = B; \ + (B) = TMP; \ } while (0) diff --git a/src/libImaging/BcnDecode.c b/src/libImaging/BcnDecode.c index 2ee367e6a..a1781e057 100644 --- a/src/libImaging/BcnDecode.c +++ b/src/libImaging/BcnDecode.c @@ -15,8 +15,6 @@ #include "Bcn.h" - - #define LOAD16(p) (p)[0] | ((p)[1] << 8) #define LOAD32(p) (p)[0] | ((p)[1] << 8) | ((p)[2] << 16) | ((p)[3] << 24)