diff options
author | 2017-06-05 07:16:03 -0700 | |
---|---|---|
committer | 2017-06-05 07:19:21 -0700 | |
commit | 48a4853ebeabfa32b360e8505caf4ec31a45cdb3 (patch) | |
tree | 3abc325fda2085583555be4cb2a393da25f3ff71 /tensorflow/core/lib/io/zlib_inputstream.cc | |
parent | 7ffc3573255ecdc27b63c6d7dfefa8345225593d (diff) |
Miscellaneous cleanups
PiperOrigin-RevId: 158012131
Diffstat (limited to 'tensorflow/core/lib/io/zlib_inputstream.cc')
-rw-r--r-- | tensorflow/core/lib/io/zlib_inputstream.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tensorflow/core/lib/io/zlib_inputstream.cc b/tensorflow/core/lib/io/zlib_inputstream.cc index 3de157a1fc..4999d5cc90 100644 --- a/tensorflow/core/lib/io/zlib_inputstream.cc +++ b/tensorflow/core/lib/io/zlib_inputstream.cc @@ -58,16 +58,14 @@ void ZlibInputStream::InitZlibBuffer() { z_stream_->avail_in = 0; int status = inflateInit2(z_stream_.get(), zlib_options_.window_bits); - if (status != Z_OK) { - LOG(FATAL) << "inflateInit failed with status " << status; - z_stream_.reset(nullptr); - } else { - z_stream_->next_in = z_stream_input_.get(); - z_stream_->next_out = z_stream_output_.get(); - next_unread_byte_ = reinterpret_cast<char*>(z_stream_output_.get()); - z_stream_->avail_in = 0; - z_stream_->avail_out = output_buffer_capacity_; - } + + CHECK_EQ(status, Z_OK) << "inflateInit failed with status " << status; + + z_stream_->next_in = z_stream_input_.get(); + z_stream_->next_out = z_stream_output_.get(); + next_unread_byte_ = reinterpret_cast<char*>(z_stream_output_.get()); + z_stream_->avail_in = 0; + z_stream_->avail_out = output_buffer_capacity_; } Status ZlibInputStream::ReadFromStream() { |