From: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> Date: Sun, 6 Aug 2023 11:19:10 +0000 (+0200) Subject: Discard trailing whitespaces X-Git-Tag: 2.1.4~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e841518da7f4861cb0a275583da0cec13714802c;p=thirdparty%2Fzlib-ng.git Discard trailing whitespaces --- diff --git a/arch/riscv/adler32_rvv.c b/arch/riscv/adler32_rvv.c index c9da34f3f..9442f2800 100644 --- a/arch/riscv/adler32_rvv.c +++ b/arch/riscv/adler32_rvv.c @@ -45,7 +45,7 @@ Z_INTERNAL uint32_t adler32_rvv(uint32_t adler, const uint8_t *buf, size_t len) * * The block_size is the largest multiple of vl that <= 256, because overflow would occur when * vl > 256 (255 * 256 <= UINT16_MAX). - * + * * We accumulate 8-bit data into a 16-bit accumulator and then * move the data into the 32-bit accumulator at the last iteration. */ diff --git a/arch/riscv/compare256_rvv.c b/arch/riscv/compare256_rvv.c index acb28035f..0fd6082c4 100644 --- a/arch/riscv/compare256_rvv.c +++ b/arch/riscv/compare256_rvv.c @@ -21,7 +21,7 @@ static inline uint32_t compare256_rvv_static(const uint8_t *src0, const uint8_t vuint8m4_t v_src1 = __riscv_vle8_v_u8m4(src1, vl); vbool2_t v_mask = __riscv_vmsne_vv_u8m4_b2(v_src0, v_src1, vl); found_diff = __riscv_vfirst_m_b2(v_mask, vl); - if (found_diff >= 0) + if (found_diff >= 0) return len + (uint32_t)found_diff; src0 += vl, src1 += vl, len += vl; } while (len < 256); diff --git a/arch/riscv/riscv_features.h b/arch/riscv/riscv_features.h index f933fc9ac..c76e967c3 100644 --- a/arch/riscv/riscv_features.h +++ b/arch/riscv/riscv_features.h @@ -2,7 +2,7 @@ * * Copyright (C) 2023 SiFive, Inc. All rights reserved. * Contributed by Alex Chiang - * + * * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/test/benchmarks/benchmark_png_shared.h b/test/benchmarks/benchmark_png_shared.h index 926b4d964..bde679e7d 100644 --- a/test/benchmarks/benchmark_png_shared.h +++ b/test/benchmarks/benchmark_png_shared.h @@ -55,21 +55,21 @@ static void init_compressible(png_bytep buf, size_t num_pix) { int32_t green_stop = num_pix; for (int32_t x = 0; i < red_stop; x += 3, ++i) { - buf[x] = 255; + buf[x] = 255; buf[x + 1] = 0; - buf[x + 2] = 0; + buf[x + 2] = 0; } for (int32_t x = 3 * i; i < blue_stop; x+= 3, ++i) { - buf[x] = 0; - buf[x + 1] = 255; - buf[x + 2] = 0; + buf[x] = 0; + buf[x + 1] = 255; + buf[x + 2] = 0; } for (int32_t x = 3 * i; i < green_stop; x += 3, ++i) { - buf[x] = 0; - buf[x + 1] = 0; - buf[x + 2] = 255; + buf[x] = 0; + buf[x + 1] = 0; + buf[x + 2] = 255; } } @@ -112,7 +112,7 @@ static void read_from_pngdat(png_structp png, png_bytep out, png_size_t bytes_to static inline int decode_png(png_parse_dat *dat, png_bytepp out_bytes, size_t in_size, uint32_t &width, uint32_t &height) { png_structp png = NULL; png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - + if (!png) abort(); png_infop info = NULL; info = png_create_info_struct(png); @@ -128,7 +128,7 @@ static inline int decode_png(png_parse_dat *dat, png_bytepp out_bytes, size_t in if (color_type != PNG_COLOR_TYPE_RGB) { fprintf(stderr, "expected an 8 bpp RGB image\n"); abort(); - } + } if (im_size > in_size) { *out_bytes = (png_bytep)realloc(*out_bytes, im_size); diff --git a/test/example.c b/test/example.c index b500af92c..d0e38c908 100644 --- a/test/example.c +++ b/test/example.c @@ -543,14 +543,14 @@ void test_dict_inflate(unsigned char *compr, size_t comprLen, unsigned char *unc } CHECK_ERR(err, "inflate with dict"); } - + err = PREFIX(inflateGetDictionary)(&d_stream, NULL, &check_dictionary_len); CHECK_ERR(err, "inflateGetDictionary"); #ifndef S390_DFLTCC_INFLATE if (check_dictionary_len < sizeof(dictionary)) error("bad dictionary length\n"); #endif - + err = PREFIX(inflateGetDictionary)(&d_stream, check_dictionary, &check_dictionary_len); CHECK_ERR(err, "inflateGetDictionary"); #ifndef S390_DFLTCC_INFLATE