From 2de80494ed9a4dc7db395a32a5efb770ce769804 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sun, 12 May 2024 16:52:09 +0300 Subject: [PATCH] xz: Add clarifying assertions --- src/xz/coder.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xz/coder.c b/src/xz/coder.c index 61054c39..90d26aee 100644 --- a/src/xz/coder.c +++ b/src/xz/coder.c @@ -292,6 +292,10 @@ coder_set_compression_settings(void) #ifdef HAVE_ENCODERS if (opt_block_list != NULL) { + // args.c ensures these. + assert(opt_mode == MODE_COMPRESS); + assert(opt_format == FORMAT_XZ); + // Find out if block_list_chain_mask has a bit set that // isn't set in filters_used_mask. const uint32_t missing_chains_mask