]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Style cleanup
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Mon, 24 Apr 2017 09:17:29 +0000 (11:17 +0200)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Mon, 24 Apr 2017 09:17:29 +0000 (11:17 +0200)
arch/aarch64/adler32_neon.c
arch/aarch64/adler32_neon.h
arch/aarch64/crc32_acle.c
arch/aarch64/fill_window_arm.c
arch/arm/adler32_neon.c
arch/arm/adler32_neon.h
arch/arm/crc32_acle.c
arch/arm/ctzl.h
arch/arm/fill_window_arm.c

index 05cb86aaa8029a37125d1e919f7cc5d596a7bb7a..9e5fae2c0562401c49556c1f12265164fa632908 100644 (file)
@@ -20,9 +20,7 @@
 #if (defined(__ARM_NEON__) || defined(__ARM_NEON))
 #include <arm_neon.h>
 
-static void NEON_accum32(uint32_t *s, const unsigned char *buf,
-                         size_t len)
-{
+static void NEON_accum32(uint32_t *s, const unsigned char *buf, size_t len) {
     static const uint8_t taps[32] = {
         32, 31, 30, 29, 28, 27, 26, 25,
         24, 23, 22, 21, 20, 19, 18, 17,
@@ -72,9 +70,7 @@ static void NEON_accum32(uint32_t *s, const unsigned char *buf,
     s[1] = vget_lane_u32(as, 1);
 }
 
-static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf,
-                             size_t len)
-{
+static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf, size_t len) {
     /* Oldie K&R code integration. */
     unsigned int i;
     for (i = 0; i < len; ++i) {
@@ -83,9 +79,7 @@ static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf,
     }
 }
 
-uint32_t adler32_neon(uint32_t adler, const unsigned char *buf,
-                      size_t len)
-{
+uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len) {
     if (!buf)
         return 1L;
 
index 285d19378443c710adac6260b81bc96462b26eda..6dffdbcb352b35a9c37ee2144614f9bfcfc6e7da 100644 (file)
 #define __NEON_ADLER32__
 
 #if (defined(__ARM_NEON__) || defined(__ARM_NEON))
-// Depending on the compiler flavor, size_t may be defined in
-// one or the other header. See:
+// Depending on the compiler flavor, size_t may be defined in one or the other header. See:
 // http://stackoverflow.com/questions/26410466/gcc-linaro-compiler-throws-error-unknown-type-name-size-t
 #include <stdint.h>
 #include <stddef.h>
-uint32_t adler32_neon(uint32_t adler, const unsigned char *buf,
-                      size_t len);
+uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len);
 #endif
 #endif
index e43cbb5e357f75fda72f4bc28ded523abd41e73f..9c914124c76ec1ab61a95edbfdcbc0b400f3ac49 100644 (file)
@@ -12,8 +12,7 @@
 #  include <stddef.h>
 #endif
 
-uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, size_t len)
-{
+uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, size_t len) {
     register uint32_t c;
     register const uint16_t *buf2;
     register const uint32_t *buf4;
index 04dd76a5704730a85dd7f5ebc2627ee46ca40087..c409b3cd813a1868eda1d315cc7d52cd61ebfd58 100644 (file)
 #include "deflate_p.h"
 #include "functable.h"
 
-extern ZLIB_INTERNAL int read_buf        (z_stream *strm, unsigned char *buf, unsigned size);
+extern ZLIB_INTERNAL int read_buf(z_stream *strm, unsigned char *buf, unsigned size);
 
 #if __ARM_NEON
 #include <arm_neon.h>
 
 /* SIMD version of hash_chain rebase */
-static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size)
-{
+static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
     register uint16x8_t v, *p;
     register size_t n;
 
@@ -47,8 +46,7 @@ static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t w
 }
 #else
 /* generic version for hash rebase */
-static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size)
-{
+static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
     unsigned int i;
     for (i = 0; i < entries; i++) {
         table[i] = (table[i] >= window_size) ? (table[i] - window_size) : NIL;
@@ -166,6 +164,5 @@ void fill_window_arm(deflate_state *s) {
         }
     }
 
-    Assert((unsigned long)s->strstart <= s->window_size - MIN_LOOKAHEAD,
-           "not enough room for search");
+    Assert((unsigned long)s->strstart <= s->window_size - MIN_LOOKAHEAD, "not enough room for search");
 }
index 05cb86aaa8029a37125d1e919f7cc5d596a7bb7a..9e5fae2c0562401c49556c1f12265164fa632908 100644 (file)
@@ -20,9 +20,7 @@
 #if (defined(__ARM_NEON__) || defined(__ARM_NEON))
 #include <arm_neon.h>
 
-static void NEON_accum32(uint32_t *s, const unsigned char *buf,
-                         size_t len)
-{
+static void NEON_accum32(uint32_t *s, const unsigned char *buf, size_t len) {
     static const uint8_t taps[32] = {
         32, 31, 30, 29, 28, 27, 26, 25,
         24, 23, 22, 21, 20, 19, 18, 17,
@@ -72,9 +70,7 @@ static void NEON_accum32(uint32_t *s, const unsigned char *buf,
     s[1] = vget_lane_u32(as, 1);
 }
 
-static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf,
-                             size_t len)
-{
+static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf, size_t len) {
     /* Oldie K&R code integration. */
     unsigned int i;
     for (i = 0; i < len; ++i) {
@@ -83,9 +79,7 @@ static void NEON_handle_tail(uint32_t *pair, const unsigned char *buf,
     }
 }
 
-uint32_t adler32_neon(uint32_t adler, const unsigned char *buf,
-                      size_t len)
-{
+uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len) {
     if (!buf)
         return 1L;
 
index 285d19378443c710adac6260b81bc96462b26eda..6dffdbcb352b35a9c37ee2144614f9bfcfc6e7da 100644 (file)
 #define __NEON_ADLER32__
 
 #if (defined(__ARM_NEON__) || defined(__ARM_NEON))
-// Depending on the compiler flavor, size_t may be defined in
-// one or the other header. See:
+// Depending on the compiler flavor, size_t may be defined in one or the other header. See:
 // http://stackoverflow.com/questions/26410466/gcc-linaro-compiler-throws-error-unknown-type-name-size-t
 #include <stdint.h>
 #include <stddef.h>
-uint32_t adler32_neon(uint32_t adler, const unsigned char *buf,
-                      size_t len);
+uint32_t adler32_neon(uint32_t adler, const unsigned char *buf, size_t len);
 #endif
 #endif
index 8293118294a566409abb63be6f9b7749d17ea338..d8a35368ce4b8a8b6b901753e0853839f57f9be6 100644 (file)
@@ -12,8 +12,7 @@
 #  include <stddef.h>
 #endif
 
-uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, size_t len)
-{
+uint32_t crc32_acle(uint32_t crc, const unsigned char *buf, size_t len) {
     register uint32_t c;
     register const uint16_t *buf2;
     register const uint32_t *buf4;
index f27cb95e22c8525440e74ef144130fb25f0a513d..5ebbde456d29f18cf951e3fc4c3f0041f3d1bb9b 100644 (file)
@@ -4,8 +4,7 @@
 #include <armintr.h>
 
 #if defined(_MSC_VER) && !defined(__clang__)
-static __forceinline unsigned long __builtin_ctzl(unsigned long value)
-{
+static __forceinline unsigned long __builtin_ctzl(unsigned long value) {
        return _arm_clz(_arm_rbit(value));
 }
 #endif
index a088a3fe51785473ff579f2eae7bd80c73f67f7b..d227662a8cadfbeef01d62d9d2003bb621b1911e 100644 (file)
 #include "deflate_p.h"
 #include "functable.h"
 
-extern ZLIB_INTERNAL int read_buf        (z_stream *strm, unsigned char *buf, unsigned size);
+extern ZLIB_INTERNAL int read_buf(z_stream *strm, unsigned char *buf, unsigned size);
 
 #if __ARM_NEON__
 #include <arm_neon.h>
 
 /* SIMD version of hash_chain rebase */
-static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size)
-{
+static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
     register uint16x8_t v, *p;
     register size_t n;
 
@@ -47,8 +46,7 @@ static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t w
 }
 #else
 /* generic version for hash rebase */
-static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size)
-{
+static inline void slide_hash_chain(Pos *table, unsigned int entries, uint16_t window_size) {
     unsigned int i;
     for (i = 0; i < entries; i++) {
         table[i] = (table[i] >= window_size) ? (table[i] - window_size) : NIL;
@@ -166,6 +164,5 @@ void fill_window_arm(deflate_state *s) {
         }
     }
 
-    Assert((unsigned long)s->strstart <= s->window_size - MIN_LOOKAHEAD,
-           "not enough room for search");
+    Assert((unsigned long)s->strstart <= s->window_size - MIN_LOOKAHEAD, "not enough room for search");
 }