summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-30 03:54:33 +0000
committerrtenneti@chromium.org <rtenneti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-30 03:54:33 +0000
commite3b74f329924c6f151d50347257e116a199200e1 (patch)
tree41a5e25b86eca22a41d1491f51004cf8b82149bd /net
parent30ed0a9b8936b1b7631c1eb76c5b0f440dc938c3 (diff)
downloadchromium_src-e3b74f329924c6f151d50347257e116a199200e1.zip
chromium_src-e3b74f329924c6f151d50347257e116a199200e1.tar.gz
chromium_src-e3b74f329924c6f151d50347257e116a199200e1.tar.bz2
QUIC - Fix 64bit win builds - Use size_t instead of int
BUG=312950 R=rch@chromium.org Review URL: https://codereview.chromium.org/46333003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/quic/iovector.h18
-rw-r--r--net/quic/quic_connection.cc2
2 files changed, 10 insertions, 10 deletions
diff --git a/net/quic/iovector.h b/net/quic/iovector.h
index 52e9d1a..74fcbef 100644
--- a/net/quic/iovector.h
+++ b/net/quic/iovector.h
@@ -17,10 +17,10 @@
namespace net {
// Calculate the total number of bytes in an array of iovec structures.
-inline size_t TotalIovecLength(const struct iovec* iov, int iovcnt) {
+inline size_t TotalIovecLength(const struct iovec* iov, size_t iovcnt) {
size_t length = 0;
if (iov != NULL) {
- for (int i = 0; i < iovcnt; ++i) {
+ for (size_t i = 0; i < iovcnt; ++i) {
length += iov[i].iov_len;
}
}
@@ -67,17 +67,17 @@ class NET_EXPORT_PRIVATE IOVector {
// Provides a way to convert system call-like iovec representation to
// IOVector.
- void AppendIovec(const struct iovec* iov, int iovcnt) {
- for (int i = 0; i < iovcnt; ++i)
+ void AppendIovec(const struct iovec* iov, size_t iovcnt) {
+ for (size_t i = 0; i < iovcnt; ++i)
Append(static_cast<char*>(iov[i].iov_base), iov[i].iov_len);
}
// Appends at most max_bytes from iovec to the IOVector.
size_t AppendIovecAtMostBytes(const struct iovec* iov,
- int iovcnt,
+ size_t iovcnt,
size_t max_bytes) {
size_t bytes_appended = 0;
- for (int i = 0; i < iovcnt && max_bytes > 0; ++i) {
+ for (size_t i = 0; i < iovcnt && max_bytes > 0; ++i) {
const size_t length = std::min(max_bytes, iov[i].iov_len);
Append(static_cast<char*>(iov[i].iov_base), length);
max_bytes -= length;
@@ -152,11 +152,11 @@ class NET_EXPORT_PRIVATE IOVector {
// Returns the number of valid blocks in the IOVector (not the number of
// bytes).
- int Size() const { return iovec_.size(); }
+ size_t Size() const { return iovec_.size(); }
// Returns the total storage used by the IOVector in number of blocks (not
// the number of bytes).
- int Capacity() const { return iovec_.capacity(); }
+ size_t Capacity() const { return iovec_.capacity(); }
// Returns true if there are no blocks in the IOVector.
bool Empty() const { return iovec_.empty(); }
@@ -180,7 +180,7 @@ class NET_EXPORT_PRIVATE IOVector {
// Returns the total number of bytes in the IOVector.
size_t TotalBufferSize() const { return TotalIovecLength(iovec(), Size()); }
- void Resize(int count) {
+ void Resize(size_t count) {
iovec_.resize(count);
}
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 97082d6..4c9a6bc 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -867,7 +867,7 @@ QuicConsumedData QuicConnection::SendStreamDataInner(
size_t bytes_written = 0;
bool fin_consumed = false;
- for (int i = 0; i < data.Size(); ++i) {
+ for (size_t i = 0; i < data.Size(); ++i) {
bool send_fin = fin && (i == data.Size() - 1);
if (!send_fin && data.iovec()[i].iov_len == 0) {
LOG(DFATAL) << "Attempt to send empty stream frame";