summaryrefslogtreecommitdiff
path: root/crc32.c
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2020-01-07 19:09:34 -0800
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-02-07 10:44:20 +0100
commite0a711cdde1d0390a922f80b69e3b365533b34cf (patch)
treed5f71e2e28a08b5e6dde57959679198a324ec49e /crc32.c
parent550f98395c8677ae9b08ec39433f5137e5cea2c8 (diff)
Fixed formatting, 4 spaces for code intent, 2 spaces for preprocessor indent, initial function brace on the same line as definition, removed extraneous spaces and new lines.
Diffstat (limited to 'crc32.c')
-rw-r--r--crc32.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/crc32.c b/crc32.c
index 557067e..5570b58 100644
--- a/crc32.c
+++ b/crc32.c
@@ -42,8 +42,7 @@ uint32_t ZEXPORT PREFIX(crc32_z)(uint32_t crc, const unsigned char *buf, size_t
#define DO4 DO1; DO1; DO1; DO1
/* ========================================================================= */
-ZLIB_INTERNAL uint32_t crc32_generic(uint32_t crc, const unsigned char *buf, uint64_t len)
-{
+ZLIB_INTERNAL uint32_t crc32_generic(uint32_t crc, const unsigned char *buf, uint64_t len) {
crc = crc ^ 0xffffffff;
#ifdef UNROLL_MORE
@@ -224,8 +223,8 @@ ZLIB_INTERNAL void copy_with_crc(PREFIX3(stream) *strm, unsigned char *dst, unsi
}
/* ========================================================================= */
-static void crc32_combine_gen_(uint32_t *op, z_off64_t len2)
-{
+
+static void crc32_combine_gen_(uint32_t *op, z_off64_t len2) {
uint32_t row;
int j;
unsigned i;
@@ -267,18 +266,16 @@ static void crc32_combine_gen_(uint32_t *op, z_off64_t len2)
}
/* ========================================================================= */
-void ZEXPORT PREFIX(crc32_combine_gen)(uint32_t *op, z_off_t len2)
-{
+
+void ZEXPORT PREFIX(crc32_combine_gen)(uint32_t *op, z_off_t len2) {
crc32_combine_gen_(op, len2);
}
-void ZEXPORT PREFIX(crc32_combine_gen64)(uint32_t *op, z_off64_t len2)
-{
+void ZEXPORT PREFIX(crc32_combine_gen64)(uint32_t *op, z_off64_t len2) {
crc32_combine_gen_(op, len2);
}
/* ========================================================================= */
-uint32_t ZEXPORT PREFIX(crc32_combine_op)(uint32_t crc1, uint32_t crc2, const uint32_t *op)
-{
+uint32_t ZEXPORT PREFIX(crc32_combine_op)(uint32_t crc1, uint32_t crc2, const uint32_t *op) {
return gf2_matrix_times(op, crc1) ^ crc2;
}