summaryrefslogtreecommitdiffstats
path: root/src/journal/test-compress-benchmark.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-05 03:46:47 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-05 03:46:47 +0100
commit15b947fb798cd131355ba9935802d58e92bdba6e (patch)
treea525ce9520cd15b7ce91f7992afbe79d9fbfb437 /src/journal/test-compress-benchmark.c
parenttest-selinux: use yes_no() and strnull() (diff)
downloadsystemd-15b947fb798cd131355ba9935802d58e92bdba6e.tar.xz
systemd-15b947fb798cd131355ba9935802d58e92bdba6e.zip
test-compress-benchmark: skip loop iteration if size is 0
Otherwise we would hit an assert in the compression code.
Diffstat (limited to '')
-rw-r--r--src/journal/test-compress-benchmark.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/journal/test-compress-benchmark.c b/src/journal/test-compress-benchmark.c
index 5b2d130cd6..0ef6d36a50 100644
--- a/src/journal/test-compress-benchmark.c
+++ b/src/journal/test-compress-benchmark.c
@@ -105,6 +105,8 @@ static void test_compress_decompress(const char* label, const char* type,
int r;
size = permute(i);
+ if (size == 0)
+ continue;
log_debug("%s %zu %zu", type, i, size);