chiark / gitweb /
journal/compress: use LZ4_compress_continue()
[elogind.git] / src / journal / compress.c
index 52a4c100b338fd9d08936f742eb4427d97c68bd6..c4c715be2f5ad9d254efc3be27418dee65ae1056 100644 (file)
@@ -460,10 +460,10 @@ int compress_stream_lz4(int fdf, int fdt, off_t max_bytes) {
 
                 total_in += n;
 
-                r = LZ4_compress_limitedOutput_continue(&lz4_data, buf, out, n, n);
+                r = LZ4_compress_continue(&lz4_data, buf, out, n);
                 if (r == 0) {
-                        log_debug("Compressed size exceeds original, aborting compression.");
-                        return -ENOBUFS;
+                        log_error("LZ4 compression failed.");
+                        return -EBADMSG;
                 }
 
                 header = htole32(r);