summaryrefslogtreecommitdiff
path: root/src/journal/compress.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-08-03 22:50:00 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-08-03 23:53:49 -0400
commitfa1c4b518ec7d8ec2d647213ee651cde4d6c9d7e (patch)
tree6f95fd77ef7f9a6a52501fa58c288cb8026ec66e /src/journal/compress.h
parent1f2b7175cf84bdbef6ee6917224658ba2adf43bf (diff)
Fix misuse of uint64_t as size_t
They have different size on 32 bit, so they are really not interchangable.
Diffstat (limited to 'src/journal/compress.h')
-rw-r--r--src/journal/compress.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/journal/compress.h b/src/journal/compress.h
index 92621ba522..136dda6d39 100644
--- a/src/journal/compress.h
+++ b/src/journal/compress.h
@@ -30,10 +30,10 @@
const char* object_compressed_to_string(int compression);
int object_compressed_from_string(const char *compression);
-int compress_blob_xz(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size);
-int compress_blob_lz4(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size);
+int compress_blob_xz(const void *src, uint64_t src_size, void *dst, size_t *dst_size);
+int compress_blob_lz4(const void *src, uint64_t src_size, void *dst, size_t *dst_size);
-static inline int compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size) {
+static inline int compress_blob(const void *src, uint64_t src_size, void *dst, size_t *dst_size) {
int r;
#ifdef HAVE_LZ4
r = compress_blob_lz4(src, src_size, dst, dst_size);
@@ -48,25 +48,25 @@ static inline int compress_blob(const void *src, uint64_t src_size, void *dst, u
}
int decompress_blob_xz(const void *src, uint64_t src_size,
- void **dst, uint64_t *dst_alloc_size, uint64_t* dst_size, uint64_t dst_max);
+ void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
int decompress_blob_lz4(const void *src, uint64_t src_size,
- void **dst, uint64_t *dst_alloc_size, uint64_t* dst_size, uint64_t dst_max);
+ void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
int decompress_blob(int compression,
const void *src, uint64_t src_size,
- void **dst, uint64_t *dst_alloc_size, uint64_t* dst_size, uint64_t dst_max);
+ void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
int decompress_startswith_xz(const void *src, uint64_t src_size,
- void **buffer, uint64_t *buffer_size,
- const void *prefix, uint64_t prefix_len,
+ void **buffer, size_t *buffer_size,
+ const void *prefix, size_t prefix_len,
uint8_t extra);
int decompress_startswith_lz4(const void *src, uint64_t src_size,
- void **buffer, uint64_t *buffer_size,
- const void *prefix, uint64_t prefix_len,
+ void **buffer, size_t *buffer_size,
+ const void *prefix, size_t prefix_len,
uint8_t extra);
int decompress_startswith(int compression,
const void *src, uint64_t src_size,
- void **buffer, uint64_t *buffer_size,
- const void *prefix, uint64_t prefix_len,
+ void **buffer, size_t *buffer_size,
+ const void *prefix, size_t prefix_len,
uint8_t extra);
int compress_stream_xz(int fdf, int fdt, off_t max_bytes);