diff options
Diffstat (limited to 'src/common/compress_lzma.c')
-rw-r--r-- | src/common/compress_lzma.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/common/compress_lzma.c b/src/common/compress_lzma.c index d453d9f718..6426ede4fd 100644 --- a/src/common/compress_lzma.c +++ b/src/common/compress_lzma.c @@ -75,7 +75,7 @@ lzma_error_str(lzma_ret error) return "Unknown LZMA error"; } } -#endif // HAVE_LZMA. +#endif /* defined(HAVE_LZMA) */ /** Return 1 if LZMA compression is supported; otherwise 0. */ int @@ -158,10 +158,12 @@ tor_lzma_state_size_precalc(int compress, compression_level_t level) return (size_t)memory_usage; + // LCOV_EXCL_START err: - return 0; // LCOV_EXCL_LINE + return 0; + // LCOV_EXCL_STOP } -#endif // HAVE_LZMA. +#endif /* defined(HAVE_LZMA) */ /** Construct and return a tor_lzma_compress_state_t object using * <b>method</b>. If <b>compress</b>, it's for compression; otherwise it's for @@ -212,16 +214,18 @@ tor_lzma_compress_new(int compress, atomic_counter_add(&total_lzma_allocation, result->allocation); return result; + /* LCOV_EXCL_START */ err: - tor_free(result); // LCOV_EXCL_LINE + tor_free(result); return NULL; -#else // HAVE_LZMA. + /* LCOV_EXCL_STOP */ +#else /* !(defined(HAVE_LZMA)) */ (void)compress; (void)method; (void)level; return NULL; -#endif // HAVE_LZMA. +#endif /* defined(HAVE_LZMA) */ } /** Compress/decompress some bytes using <b>state</b>. Read up to @@ -306,7 +310,7 @@ tor_lzma_compress_process(tor_lzma_compress_state_t *state, lzma_error_str(retval)); return TOR_COMPRESS_ERROR; } -#else // HAVE_LZMA. +#else /* !(defined(HAVE_LZMA)) */ (void)state; (void)out; (void)out_len; @@ -314,7 +318,7 @@ tor_lzma_compress_process(tor_lzma_compress_state_t *state, (void)in_len; (void)finish; return TOR_COMPRESS_ERROR; -#endif // HAVE_LZMA. +#endif /* defined(HAVE_LZMA) */ } /** Deallocate <b>state</b>. */ |