Skip to content

Commit

Permalink
Reland 90618 - Remove check for entry_. From coverity CID=8237
Browse files Browse the repository at this point in the history
Check result of inflateInit Coverity CID=14712

R=fischman@chromium.org


Review URL: http://codereview.chromium.org/7253017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90696 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
gbillock@chromium.org committed Jun 28, 2011
1 parent 111a1d6 commit afaeea9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/http/http_cache_transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ int HttpCache::Transaction::BeginCacheValidation() {
cache_->ConvertWriterToReader(entry_);
mode_ = READ;

if (entry_ && entry_->disk_entry->GetDataSize(kMetadataIndex))
if (entry_->disk_entry->GetDataSize(kMetadataIndex))
next_state_ = STATE_CACHE_READ_METADATA;
} else {
// Make the network request conditional, to see if we may reuse our cached
Expand Down
5 changes: 3 additions & 2 deletions remoting/base/decompressor_zlib.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

Expand Down Expand Up @@ -59,7 +59,8 @@ void DecompressorZlib::InitStream() {
stream_->zfree = Z_NULL;
stream_->opaque = Z_NULL;

inflateInit(stream_.get());
int ret = inflateInit(stream_.get());
DCHECK_EQ(ret, Z_OK);
}

} // namespace remoting

0 comments on commit afaeea9

Please sign in to comment.