Discard trailing whitespaces

This commit is contained in:
Dimitri Papadopoulos 2023-08-06 13:19:10 +02:00 committed by Hans Kristian Rosbach
parent 3605d984d8
commit e841518da7
5 changed files with 15 additions and 15 deletions

View File

@ -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.
*/

View File

@ -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);

View File

@ -2,7 +2,7 @@
*
* Copyright (C) 2023 SiFive, Inc. All rights reserved.
* Contributed by Alex Chiang <alex.chiang@sifive.com>
*
*
* For conditions of distribution and use, see copyright notice in zlib.h
*/

View File

@ -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);

View File

@ -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