aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/gzip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 18d795996..bc1f9c60b 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -442,19 +442,19 @@ static void put_16bit(ush w)
442 *dst = (uch)w; 442 *dst = (uch)w;
443 w >>= 8; 443 w >>= 8;
444#else 444#else
445 *dst++ = (uch)w; 445 *dst = (uch)w;
446 w >>= 8; 446 w >>= 8;
447 if (outcnt < OUTBUFSIZ-2) { 447 if (outcnt < OUTBUFSIZ-2) {
448 /* Common case */ 448 /* Common case */
449 *dst = w; 449 dst[1] = w;
450 G1.outcnt = outcnt + 2; 450 G1.outcnt = outcnt + 2;
451 return; 451 return;
452 } 452 }
453#endif 453#endif
454 454
455 /* Slowpath: we will need to do flush_outbuf() */ 455 /* Slowpath: we will need to do flush_outbuf() */
456 G1.outcnt++; 456 G1.outcnt = ++outcnt;
457 if (G1.outcnt == OUTBUFSIZ) 457 if (outcnt == OUTBUFSIZ)
458 flush_outbuf(); 458 flush_outbuf();
459 put_8bit(w); 459 put_8bit(w);
460} 460}