diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-07 11:56:32 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-07-07 12:06:26 +0200 |
commit | 8ab0f03266a2217d45bff90e6104164ca51cf1ed (patch) | |
tree | a2d377ea2156475f9cf0b551d3fe8065c17caefa | |
parent | 0da425df6580684f286cb2c7ad84612841cc5797 (diff) | |
download | systemd-8ab0f03266a2217d45bff90e6104164ca51cf1ed.tar.gz |
journal/compress: drop "future" code in zstd compression
We generally don't include stuff that is not used. This can be
easily ressurected if ever needed.
Fixes CID#1430210.
-rw-r--r-- | src/journal/compress.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/journal/compress.c b/src/journal/compress.c index ec398e0cc1..e6ce64fc65 100644 --- a/src/journal/compress.c +++ b/src/journal/compress.c @@ -852,8 +852,6 @@ int compress_stream_zstd(int fdf, int fdt, uint64_t max_bytes) { size_t in_allocsize, out_allocsize; size_t z; uint64_t left = max_bytes, in_bytes = 0; - /* This can be used in the future to add uncompressed size to the header */ - uint64_t in_totalsize = 0; assert(fdf >= 0); assert(fdt >= 0); @@ -867,11 +865,6 @@ int compress_stream_zstd(int fdf, int fdt, uint64_t max_bytes) { if (!cctx || !out_buff || !in_buff) return -ENOMEM; - if (in_totalsize) { - z = ZSTD_CCtx_setPledgedSrcSize(cctx, in_totalsize); - if (z) - log_debug("Failed to enable ZSTD input size, ignoring: %s", ZSTD_getErrorName(z)); - } z = ZSTD_CCtx_setParameter(cctx, ZSTD_c_checksumFlag, 1); if (ZSTD_isError(z)) log_debug("Failed to enable ZSTD checksum, ignoring: %s", ZSTD_getErrorName(z)); |