JosiahWI commented on code in PR #10716: URL: https://github.com/apache/trafficserver/pull/10716#discussion_r1379503469
########## src/iocore/cache/CacheHosting.cc: ########## @@ -78,12 +78,12 @@ CacheHostMatcher::PrintFunc(void *opaque_data) d->Print(); } -// void CacheHostMatcher::AllocateSpace(int num_entries) +// void CacheHostMatcher::AllocateSpace(uint32_t num_entries) // // Allocates the HostLeaf and Data arrays // void -CacheHostMatcher::AllocateSpace(int num_entries) +CacheHostMatcher::AllocateSpace(uint32_t num_entries) { // Should not have been allocated before ink_assert(array_len == -1); Review Comment: There are some suspicious asserts throughout this file similar to the ones in ControlMatcher.cc. ########## src/iocore/dns/SplitDNS.cc: ########## @@ -236,8 +236,8 @@ SplitDNS::findServer(RequestData *rdata, SplitDNSResult *result) return; } - int len = strlen(pHost); - int n = std::min(static_cast<size_t>(m_numEle), m_pxLeafArray->size()); + int len = strlen(pHost); + uint32_t n = std::min(static_cast<size_t>(m_numEle), m_pxLeafArray->size()); for (int i = 0; i < n; i++) { Review Comment: ```suggestion for (size_t i = 0; i < n; i++) { ``` ########## src/iocore/dns/SplitDNS.cc: ########## @@ -236,8 +236,8 @@ SplitDNS::findServer(RequestData *rdata, SplitDNSResult *result) return; } - int len = strlen(pHost); - int n = std::min(static_cast<size_t>(m_numEle), m_pxLeafArray->size()); + int len = strlen(pHost); + uint32_t n = std::min(static_cast<size_t>(m_numEle), m_pxLeafArray->size()); Review Comment: ```suggestion size_t = std::min(static_cast<size_t>(m_numEle), m_pxLeafArray->size()); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@trafficserver.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org