From b62d4d9d5700d4931faac500fca11f440dacd610 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 3 Feb 2015 15:25:17 +0100 Subject: gzip: trivial code shrink -5 bytes Signed-off-by: Denys Vlasenko --- archival/gzip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archival/gzip.c b/archival/gzip.c index 18d7959..bc1f9c6 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -442,19 +442,19 @@ static void put_16bit(ush w) *dst = (uch)w; w >>= 8; #else - *dst++ = (uch)w; + *dst = (uch)w; w >>= 8; if (outcnt < OUTBUFSIZ-2) { /* Common case */ - *dst = w; + dst[1] = w; G1.outcnt = outcnt + 2; return; } #endif /* Slowpath: we will need to do flush_outbuf() */ - G1.outcnt++; - if (G1.outcnt == OUTBUFSIZ) + G1.outcnt = ++outcnt; + if (outcnt == OUTBUFSIZ) flush_outbuf(); put_8bit(w); } -- cgit v1.1