summaryrefslogtreecommitdiff
path: root/inffast.c
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2020-10-18 17:31:51 +0200
committerHans Kristian Rosbach <hk-github@circlestorm.org>2020-10-24 15:51:46 +0200
commit234b282cb90e72eedca85df9adce013743f5b95f (patch)
treea076c7e0e14a76efae9b3ba98fbaa80d509e218f /inffast.c
parent6ce39348ba7b7a554507856232dcb6ed4aba5a20 (diff)
Small formatting changes in inflate.c, inflate.h and inffast.c
Diffstat (limited to 'inffast.c')
-rw-r--r--inffast.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/inffast.c b/inffast.c
index f85a37e..18ce570 100644
--- a/inffast.c
+++ b/inffast.c
@@ -260,11 +260,10 @@ void Z_INTERNAL zng_inflate_fast(PREFIX3(stream) *strm, unsigned long start) {
out = functable.chunkcopy_safe(out, from, len, safe);
}
} else {
- /* Whole reference is in range of current output. No
- range checks are necessary because we start with room
- for at least 258 bytes of output, so unroll and roundoff
- operations can write beyond `out+len` so long as they
- stay within 258 bytes of `out`.
+ /* Whole reference is in range of current output. No range checks are
+ necessary because we start with room for at least 258 bytes of output,
+ so unroll and roundoff operations can write beyond `out+len` so long
+ as they stay within 258 bytes of `out`.
*/
if (dist >= len || dist >= state->chunksize)
out = functable.chunkcopy(out, out - dist, len);
@@ -300,12 +299,10 @@ void Z_INTERNAL zng_inflate_fast(PREFIX3(stream) *strm, unsigned long start) {
/* update state and return */
strm->next_in = in;
strm->next_out = out;
- strm->avail_in =
- (unsigned)(in < last ? (INFLATE_FAST_MIN_HAVE - 1) + (last - in)
- : (INFLATE_FAST_MIN_HAVE - 1) - (in - last));
- strm->avail_out =
- (unsigned)(out < end ? (INFLATE_FAST_MIN_LEFT - 1) + (end - out)
- : (INFLATE_FAST_MIN_LEFT - 1) - (out - end));
+ strm->avail_in = (unsigned)(in < last ? (INFLATE_FAST_MIN_HAVE - 1) + (last - in)
+ : (INFLATE_FAST_MIN_HAVE - 1) - (in - last));
+ strm->avail_out = (unsigned)(out < end ? (INFLATE_FAST_MIN_LEFT - 1) + (end - out)
+ : (INFLATE_FAST_MIN_LEFT - 1) - (out - end));
Assert(bits <= 32, "Remaining bits greater than 32");
state->hold = (uint32_t)hold;