aboutsummaryrefslogtreecommitdiff
path: root/archival/gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/gzip.c')
-rw-r--r--archival/gzip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 7df38c2bc..92130e7fb 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -634,7 +634,8 @@ static void copy_block(char *buf, unsigned len, int header)
put_8bit(*buf++);
}
/* The above can 32-bit misalign outbuf */
- flush_outbuf_if_32bit_optimized();
+ if (G1.outcnt & 3) /* syscalls are expensive, is it really misaligned? */
+ flush_outbuf_if_32bit_optimized();
}