From: Hans Kristian Rosbach Date: Mon, 24 Apr 2017 09:17:29 +0000 (+0200) Subject: Style cleanup X-Git-Tag: 1.9.9-b1~660^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a95dbaf1995a33646544acd63856dbe5c2fe8a39;p=thirdparty%2Fzlib-ng.git Style cleanup --- diff --git a/arch/aarch64/adler32_neon.c b/arch/aarch64/adler32_neon.c index 05cb86aaa..9e5fae2c0 100644 --- a/arch/aarch64/adler32_neon.c +++ b/arch/aarch64/adler32_neon.c @@ -20,9 +20,7 @@ #if (defined(__ARM_NEON__) || defined(__ARM_NEON)) #include -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; diff --git a/arch/aarch64/adler32_neon.h b/arch/aarch64/adler32_neon.h index 285d19378..6dffdbcb3 100644 --- a/arch/aarch64/adler32_neon.h +++ b/arch/aarch64/adler32_neon.h @@ -20,12 +20,10 @@ #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 #include -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 diff --git a/arch/aarch64/crc32_acle.c b/arch/aarch64/crc32_acle.c index e43cbb5e3..9c914124c 100644 --- a/arch/aarch64/crc32_acle.c +++ b/arch/aarch64/crc32_acle.c @@ -12,8 +12,7 @@ # include #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; diff --git a/arch/aarch64/fill_window_arm.c b/arch/aarch64/fill_window_arm.c index 04dd76a57..c409b3cd8 100644 --- a/arch/aarch64/fill_window_arm.c +++ b/arch/aarch64/fill_window_arm.c @@ -14,14 +14,13 @@ #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 /* 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"); } diff --git a/arch/arm/adler32_neon.c b/arch/arm/adler32_neon.c index 05cb86aaa..9e5fae2c0 100644 --- a/arch/arm/adler32_neon.c +++ b/arch/arm/adler32_neon.c @@ -20,9 +20,7 @@ #if (defined(__ARM_NEON__) || defined(__ARM_NEON)) #include -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; diff --git a/arch/arm/adler32_neon.h b/arch/arm/adler32_neon.h index 285d19378..6dffdbcb3 100644 --- a/arch/arm/adler32_neon.h +++ b/arch/arm/adler32_neon.h @@ -20,12 +20,10 @@ #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 #include -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 diff --git a/arch/arm/crc32_acle.c b/arch/arm/crc32_acle.c index 829311829..d8a35368c 100644 --- a/arch/arm/crc32_acle.c +++ b/arch/arm/crc32_acle.c @@ -12,8 +12,7 @@ # include #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; diff --git a/arch/arm/ctzl.h b/arch/arm/ctzl.h index f27cb95e2..5ebbde456 100644 --- a/arch/arm/ctzl.h +++ b/arch/arm/ctzl.h @@ -4,8 +4,7 @@ #include #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 diff --git a/arch/arm/fill_window_arm.c b/arch/arm/fill_window_arm.c index a088a3fe5..d227662a8 100644 --- a/arch/arm/fill_window_arm.c +++ b/arch/arm/fill_window_arm.c @@ -14,14 +14,13 @@ #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 /* 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"); }