@@ -3787,10 +3787,8 @@ _compare_pixels(
37873787 // Fortunately, all of the modes that have extra bytes in their pixels
37883788 // use four bytes for their pixels.
37893789 UINT32 mask = 0xffffffff ;
3790- if (
3791- !strcmp (mode , "RGB" ) || !strcmp (mode , "YCbCr" ) ||
3792- !strcmp (mode , "HSV" ) || !strcmp (mode , "LAB" )
3793- ) {
3790+ if (!strcmp (mode , "RGB" ) || !strcmp (mode , "YCbCr" ) || !strcmp (mode , "HSV" ) ||
3791+ !strcmp (mode , "LAB" )) {
37943792 // These modes have three channels in four bytes,
37953793 // so we have to ignore the last byte.
37963794#ifdef WORDS_BIGENDIAN
@@ -3844,11 +3842,8 @@ image_richcompare(const ImagingObject *self, const PyObject *other, const int op
38443842 const Imaging img_a = self -> image ;
38453843 const Imaging img_b = ((ImagingObject * )other )-> image ;
38463844
3847- if (
3848- strcmp (img_a -> mode , img_b -> mode )
3849- || img_a -> xsize != img_b -> xsize
3850- || img_a -> ysize != img_b -> ysize
3851- ) {
3845+ if (strcmp (img_a -> mode , img_b -> mode ) || img_a -> xsize != img_b -> xsize ||
3846+ img_a -> ysize != img_b -> ysize ) {
38523847 if (op == Py_EQ ) {
38533848 Py_RETURN_FALSE ;
38543849 } else {
@@ -3863,18 +3858,15 @@ image_richcompare(const ImagingObject *self, const PyObject *other, const int op
38633858 const UINT8 * palette_b_data = palette_b -> palette ;
38643859 const UINT8 * * palette_a_data_ptr = & palette_a_data ;
38653860 const UINT8 * * palette_b_data_ptr = & palette_b_data ;
3866- if (
3867- !palette_a || !palette_b
3868- || palette_a -> size != palette_b -> size
3869- || strcmp (palette_a -> mode , palette_b -> mode )
3870- || _compare_pixels (
3861+ if (!palette_a || !palette_b || palette_a -> size != palette_b -> size ||
3862+ strcmp (palette_a -> mode , palette_b -> mode ) ||
3863+ _compare_pixels (
38713864 palette_a -> mode ,
38723865 1 ,
38733866 palette_a -> size * 4 ,
38743867 palette_a_data_ptr ,
38753868 palette_b_data_ptr
3876- )
3877- ) {
3869+ )) {
38783870 if (op == Py_EQ ) {
38793871 Py_RETURN_FALSE ;
38803872 } else {
@@ -3889,8 +3881,7 @@ image_richcompare(const ImagingObject *self, const PyObject *other, const int op
38893881 img_a -> linesize ,
38903882 (const UINT8 * * )img_a -> image ,
38913883 (const UINT8 * * )img_b -> image
3892- )
3893- ) {
3884+ )) {
38943885 if (op == Py_EQ ) {
38953886 Py_RETURN_FALSE ;
38963887 } else {
0 commit comments