Don't call things 'max', a=bustage
authorMartin Thomson <martin.thomson@gmail.com>
Sun, 11 Jun 2017 16:21:46 +0100
changeset 13429 016802032ef475fd9ca9c8dab81bffd1ad64be5a
parent 13425 358f4a15869f7b2fd88c33e58352b1c6f9390efa
child 13430 e483be3667d8a68c2ffb8073368a0c9c9ca74658
push id2244
push usermartin.thomson@gmail.com
push dateSun, 11 Jun 2017 15:23:39 +0000
reviewersbustage
Don't call things 'max', a=bustage
gtests/ssl_gtest/tls_agent.cc
--- a/gtests/ssl_gtest/tls_agent.cc
+++ b/gtests/ssl_gtest/tls_agent.cc
@@ -913,20 +913,20 @@ void TlsAgent::SendBuffer(const DataBuff
     EXPECT_NE(PR_WOULD_BLOCK_ERROR, error_code_);
     error_code_ = PR_GetError();
     expect_readwrite_error_ = false;
   } else {
     ASSERT_EQ(buf.len(), static_cast<size_t>(rv));
   }
 }
 
-void TlsAgent::ReadBytes(size_t max) {
-  uint8_t block[1024];
+void TlsAgent::ReadBytes(size_t amount) {
+  uint8_t block[amount];
 
-  int32_t rv = PR_Read(ssl_fd(), block, (std::min)(max, sizeof(block)));
+  int32_t rv = PR_Read(ssl_fd(), block, sizeof(block));
   LOGV("ReadBytes " << rv);
   int32_t err;
 
   if (rv >= 0) {
     size_t count = static_cast<size_t>(rv);
     for (size_t i = 0; i < count; ++i) {
       ASSERT_EQ(recv_ctr_ & 0xff, block[i]);
       recv_ctr_++;