]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Discard trailing whitespaces
authorDimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Sun, 6 Aug 2023 11:19:10 +0000 (13:19 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 7 Aug 2023 06:23:52 +0000 (08:23 +0200)
arch/riscv/adler32_rvv.c
arch/riscv/compare256_rvv.c
arch/riscv/riscv_features.h
test/benchmarks/benchmark_png_shared.h
test/example.c

index c9da34f3f89ef12d1b4f8ce4d9cfbc105ab1ce38..9442f2800347b79a68518b8909109102568ebd4a 100644 (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.
      */
index acb28035f3fbaf728080bf2cc430560f109bec25..0fd6082c44d0ab91bd61704a60c397bea0a9fc90 100644 (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);
index f933fc9acba740a00301384dac4aae53cc54a3bd..c76e967c36cecaffda7e907dbe83ff12b32bace9 100644 (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
  */
 
index 926b4d964f59822deb6aa9aed405699b4d6868e1..bde679e7d3e3a0eb30e5ab366c81f12c7c4723a1 100644 (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);
index b500af92c60e04708d2c72beb819f4e6c3282a74..d0e38c90804052d1443046e3ee155cfdd2ad5290 100644 (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