diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-02 23:19:33 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-02 23:19:33 +0000 |
commit | b1f031ddf0723e5a4811bf9fa6fdda68c97633de (patch) | |
tree | 81be42f2b7c8cbf8e2bb5aaea1f1b1a6213413ca /net/http/http_stream_parser.cc | |
parent | 136ba26595ceafeb57a5c4d524caf7f87b95daf3 (diff) | |
download | chromium_src-b1f031ddf0723e5a4811bf9fa6fdda68c97633de.zip chromium_src-b1f031ddf0723e5a4811bf9fa6fdda68c97633de.tar.gz chromium_src-b1f031ddf0723e5a4811bf9fa6fdda68c97633de.tar.bz2 |
Use CHECK_* in net
Review URL: http://codereview.chromium.org/660404
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40453 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_stream_parser.cc')
-rw-r--r-- | net/http/http_stream_parser.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/http/http_stream_parser.cc b/net/http/http_stream_parser.cc index 02b09f0..3633af3 100644 --- a/net/http/http_stream_parser.cc +++ b/net/http/http_stream_parser.cc @@ -310,7 +310,7 @@ int HttpStreamParser::DoReadHeadersComplete(int result) { io_state_ = STATE_DONE; int extra_bytes = read_buf_->offset() - read_buf_unused_offset_; if (extra_bytes) { - CHECK(extra_bytes > 0); + CHECK_GT(extra_bytes, 0); memmove(read_buf_->StartOfBuffer(), read_buf_->StartOfBuffer() + read_buf_unused_offset_, extra_bytes); @@ -331,7 +331,7 @@ int HttpStreamParser::DoReadBody() { if (read_buf_->offset()) { int available = read_buf_->offset() - read_buf_unused_offset_; if (available) { - CHECK(available > 0); + CHECK_GT(available, 0); int bytes_from_buffer = std::min(available, user_read_buf_len_); memcpy(user_read_buf_->data(), read_buf_->StartOfBuffer() + read_buf_unused_offset_, @@ -396,7 +396,7 @@ int HttpStreamParser::DoReadBodyComplete(int result) { } } - CHECK(save_amount + additional_save_amount <= kMaxBufSize); + CHECK_LE(save_amount + additional_save_amount, kMaxBufSize); if (read_buf_->capacity() < save_amount + additional_save_amount) { read_buf_->SetCapacity(save_amount + additional_save_amount); } |