chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix misuse of uint64_t as size_t
[elogind.git]
/
src
/
journal
/
test-compress.c
diff --git
a/src/journal/test-compress.c
b/src/journal/test-compress.c
index 4c0a9a08e49584b95ce3cb052b06860f9f0d6697..f5f5f8df39022008a0129f204f7e4d10390a3a8d 100644
(file)
--- a/
src/journal/test-compress.c
+++ b/
src/journal/test-compress.c
@@
-34,14
+34,13
@@
#endif
typedef int (compress_blob_t)(const void *src, uint64_t src_size,
#endif
typedef int (compress_blob_t)(const void *src, uint64_t src_size,
- void *dst,
uint64
_t *dst_size);
+ void *dst,
size
_t *dst_size);
typedef int (decompress_blob_t)(const void *src, uint64_t src_size,
typedef int (decompress_blob_t)(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);
typedef int (decompress_sw_t)(const void *src, uint64_t src_size,
typedef int (decompress_sw_t)(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);
typedef int (compress_stream_t)(int fdf, int fdt, off_t max_bytes);
uint8_t extra);
typedef int (compress_stream_t)(int fdf, int fdt, off_t max_bytes);
@@
-53,8
+52,8
@@
static void test_compress_decompress(int compression,
char text[] = "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"
"foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF";
char compressed[512];
char text[] = "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"
"foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF";
char compressed[512];
-
uint64
_t csize = 512;
-
uint64
_t usize = 0;
+
size
_t csize = 512;
+
size
_t usize = 0;
_cleanup_free_ char *decompressed = NULL;
int r;
_cleanup_free_ char *decompressed = NULL;
int r;
@@
-92,8
+91,8
@@
static void test_decompress_startswith(int compression,
char text[] = "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"
"foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF";
char compressed[512];
char text[] = "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"
"foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF";
char compressed[512];
-
uint64
_t csize = 512;
-
uint64
_t usize = 0;
+
size
_t csize = 512;
+
size
_t usize = 0;
_cleanup_free_ char *decompressed = NULL;
log_info("/* testing decompress_startswith with %s */",
_cleanup_free_ char *decompressed = NULL;
log_info("/* testing decompress_startswith with %s */",