Skip to content

Commit 07e8078

Browse files
committed
Fix BZip constants
Summary: We were using ZLIB constants in BZIP code path. This caused some errors, like: facebook/rocksdb#8 Test Plan: make clean; make check Reviewers: dhruba, kailiu Reviewed By: dhruba CC: leveldb Differential Revision: https://reviews.facebook.net/D14175
1 parent e51f55d commit 07e8078

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

port/port_posix.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ inline bool BZip2_Compress(const CompressionOptions& opts, const char* input,
339339
_stream.next_out = (char *)&(*output)[old_sz];
340340
_stream.avail_out = new_sz - old_sz;
341341
break;
342-
case Z_BUF_ERROR:
342+
case BZ_SEQUENCE_ERROR:
343343
default:
344344
BZ2_bzCompressEnd(&_stream);
345345
return false;
@@ -383,7 +383,7 @@ inline char* BZip2_Uncompress(const char* input_data, size_t input_length,
383383
switch (st) {
384384
case BZ_STREAM_END:
385385
break;
386-
case Z_OK:
386+
case BZ_OK:
387387
// No output space. Increase the output space by 20%.
388388
old_sz = output_len;
389389
output_len = (int)(output_len * 1.2);

0 commit comments

Comments
 (0)