summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/proc_net.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/syscalls/linux/proc_net.cc')
-rw-r--r--test/syscalls/linux/proc_net.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/syscalls/linux/proc_net.cc b/test/syscalls/linux/proc_net.cc
index 23677e296..1cc700fe7 100644
--- a/test/syscalls/linux/proc_net.cc
+++ b/test/syscalls/linux/proc_net.cc
@@ -420,14 +420,14 @@ TEST(ProcNetSnmp, CheckNetStat) {
int name_count = 0;
int value_count = 0;
std::vector<absl::string_view> lines = absl::StrSplit(contents, '\n');
- for (int i = 0; i + 1 < lines.size(); i += 2) {
+ for (long unsigned int i = 0; i + 1 < lines.size(); i += 2) {
std::vector<absl::string_view> names =
absl::StrSplit(lines[i], absl::ByAnyChar("\t "));
std::vector<absl::string_view> values =
absl::StrSplit(lines[i + 1], absl::ByAnyChar("\t "));
EXPECT_EQ(names.size(), values.size()) << " mismatch in lines '" << lines[i]
<< "' and '" << lines[i + 1] << "'";
- for (int j = 0; j < names.size() && j < values.size(); ++j) {
+ for (long unsigned int j = 0; j < names.size() && j < values.size(); ++j) {
if (names[j] == "TCPOrigDataSent" || names[j] == "TCPSynRetrans" ||
names[j] == "TCPDSACKRecv" || names[j] == "TCPDSACKOfoRecv") {
++name_count;
@@ -457,14 +457,14 @@ TEST(ProcNetSnmp, CheckSnmp) {
int name_count = 0;
int value_count = 0;
std::vector<absl::string_view> lines = absl::StrSplit(contents, '\n');
- for (int i = 0; i + 1 < lines.size(); i += 2) {
+ for (long unsigned int i = 0; i + 1 < lines.size(); i += 2) {
std::vector<absl::string_view> names =
absl::StrSplit(lines[i], absl::ByAnyChar("\t "));
std::vector<absl::string_view> values =
absl::StrSplit(lines[i + 1], absl::ByAnyChar("\t "));
EXPECT_EQ(names.size(), values.size()) << " mismatch in lines '" << lines[i]
<< "' and '" << lines[i + 1] << "'";
- for (int j = 0; j < names.size() && j < values.size(); ++j) {
+ for (long unsigned int j = 0; j < names.size() && j < values.size(); ++j) {
if (names[j] == "RetransSegs") {
++name_count;
int64_t val;