diff --git a/main.c b/main.c index 4be8583..fbb9cf8 100644 --- a/main.c +++ b/main.c @@ -72,7 +72,7 @@ static void write_magic(int fd_in, int fd_out) memcpy(&magic[6], &control.st_size, 8); /* save LZMA compression flags */ - if (LZMA_COMPRESS(control.flags)) { + if (LZMA_COMPRESS) { for (i = 0; i < 5; i++) magic[i + 16] = (char)control.lzma_properties[i]; } @@ -719,7 +719,7 @@ int main(int argc, char *argv[]) if (VERBOSE && !INFO) { print_err("The following options are in effect for this %s.\n", DECOMPRESS ? "DECOMPRESSION" : "COMPRESSION"); - if (LZMA_COMPRESS(control.flags)) + if (LZMA_COMPRESS) print_err("Threading is %s. Number of CPUs detected: %lu\n", control.threads > 1? "ENABLED" : "DISABLED", control.threads); print_err("Nice Value: %d\n", control.nice_val); @@ -739,11 +739,11 @@ int main(int argc, char *argv[]) print_err("Output Filename Specified: %s\n", control.outname); if (TEST_ONLY) print_err("Test file integrity\n"); - + /* show compression options */ if (!DECOMPRESS) { print_err("Compression mode is: "); - if (LZMA_COMPRESS(control.flags)) + if (LZMA_COMPRESS) print_err("LZMA. LZO Test Compression Threshold: %.f\n", (control.threshold < 1.05 ? 21 - control.threshold * 20 : 0)); else if (LZO_COMPRESS) diff --git a/rzip.h b/rzip.h index 7975484..5452c39 100644 --- a/rzip.h +++ b/rzip.h @@ -138,7 +138,7 @@ typedef uint32_t u32; #define FLAG_VERBOSE (FLAG_VERBOSITY | FLAG_VERBOSITY_MAX) #define FLAG_NOT_LZMA (FLAG_NO_COMPRESS | FLAG_LZO_COMPRESS | FLAG_BZIP2_COMPRESS | FLAG_ZLIB_COMPRESS | FLAG_ZPAQ_COMPRESS) -#define LZMA_COMPRESS(C) (!((C) & FLAG_NOT_LZMA)) +#define LZMA_COMPRESS (!(control.flags & FLAG_NOT_LZMA)) #define SHOW_PROGRESS (control.flags & FLAG_SHOW_PROGRESS) #define KEEP_FILES (control.flags & FLAG_KEEP_FILES)