diff options
Diffstat (limited to 'src/journal/test-compress.c')
-rw-r--r-- | src/journal/test-compress.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/journal/test-compress.c b/src/journal/test-compress.c index 92108a84b3..6948e8ccbe 100644 --- a/src/journal/test-compress.c +++ b/src/journal/test-compress.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#ifdef HAVE_LZ4 +#if HAVE_LZ4 #include <lz4.h> #endif @@ -29,13 +29,13 @@ #include "random-util.h" #include "util.h" -#ifdef HAVE_XZ +#if HAVE_XZ # define XZ_OK 0 #else # define XZ_OK -EPROTONOSUPPORT #endif -#ifdef HAVE_LZ4 +#if HAVE_LZ4 # define LZ4_OK 0 #else # define LZ4_OK -EPROTONOSUPPORT @@ -54,7 +54,7 @@ typedef int (decompress_sw_t)(const void *src, uint64_t src_size, typedef int (compress_stream_t)(int fdf, int fdt, uint64_t max_bytes); typedef int (decompress_stream_t)(int fdf, int fdt, uint64_t max_size); -#if defined(HAVE_XZ) || defined(HAVE_LZ4) +#if HAVE_XZ || HAVE_LZ4 static void test_compress_decompress(int compression, compress_blob_t compress, decompress_blob_t decompress, @@ -206,7 +206,7 @@ static void test_compress_stream(int compression, } #endif -#ifdef HAVE_LZ4 +#if HAVE_LZ4 static void test_lz4_decompress_partial(void) { char buf[20000]; size_t buf_size = sizeof(buf), compressed; @@ -249,7 +249,7 @@ static void test_lz4_decompress_partial(void) { #endif int main(int argc, char *argv[]) { -#if defined(HAVE_XZ) || defined(HAVE_LZ4) +#if HAVE_XZ || HAVE_LZ4 const char text[] = "text\0foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF" "foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"; @@ -268,7 +268,7 @@ int main(int argc, char *argv[]) { random_bytes(data + 7, sizeof(data) - 7); -#ifdef HAVE_XZ +#if HAVE_XZ test_compress_decompress(OBJECT_COMPRESSED_XZ, compress_blob_xz, decompress_blob_xz, text, sizeof(text), false); test_compress_decompress(OBJECT_COMPRESSED_XZ, compress_blob_xz, decompress_blob_xz, @@ -290,7 +290,7 @@ int main(int argc, char *argv[]) { log_info("/* XZ test skipped */"); #endif -#ifdef HAVE_LZ4 +#if HAVE_LZ4 test_compress_decompress(OBJECT_COMPRESSED_LZ4, compress_blob_lz4, decompress_blob_lz4, text, sizeof(text), false); test_compress_decompress(OBJECT_COMPRESSED_LZ4, compress_blob_lz4, decompress_blob_lz4, |