From b1f031ddf0723e5a4811bf9fa6fdda68c97633de Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Tue, 2 Mar 2010 23:19:33 +0000 Subject: 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 --- net/http/http_stream_parser.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'net/http/http_stream_parser.cc') 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); } -- cgit v1.1