Minor fix for adapt mode.

This commit is contained in:
Moinak Ghosh 2012-11-04 21:46:04 +05:30
parent f0c7ba87a3
commit 3aa33f5b94

View file

@ -197,7 +197,7 @@ adapt_compress(void *src, size_t srclen, void *dst,
bzip2_count++; bzip2_count++;
} else { } else {
if (tagcnt > ONE_PCT(srclen)) { if (adat->bsc_data && tagcnt > ONE_PCT(srclen)) {
rv = libbsc_compress(src, srclen, dst, dstlen, level, chdr, adat->bsc_data); rv = libbsc_compress(src, srclen, dst, dstlen, level, chdr, adat->bsc_data);
if (rv < 0) if (rv < 0)
return (rv); return (rv);
@ -237,7 +237,7 @@ adapt_decompress(void *src, size_t srclen, void *dst,
return (libbsc_decompress(src, srclen, dst, dstlen, level, chdr, adat->bsc_data)); return (libbsc_decompress(src, srclen, dst, dstlen, level, chdr, adat->bsc_data));
} else { } else {
fprintf(stderr, "Unrecognized compression mode, file corrupt.\n"); fprintf(stderr, "Unrecognized compression mode: %d, file corrupt.\n", cmp_flags);
} }
return (-1); return (-1);
} }