summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-10-14 18:33:26 -0700
committergVisor bot <gvisor-bot@google.com>2021-10-14 18:36:09 -0700
commit1711fd9efe86948198d836faf060e7dea60bae8d (patch)
tree3f887f0ff91b194bdf53c766c241c3ee69d7cc37 /test
parent6f4fcc4bac81f0fc73712b0216e3ed50b056a925 (diff)
Fix compiler warnings
PiperOrigin-RevId: 403241314
Diffstat (limited to 'test')
-rw-r--r--test/syscalls/linux/socket_ip_udp_generic.cc2
-rw-r--r--test/syscalls/linux/tcp_socket.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/syscalls/linux/socket_ip_udp_generic.cc b/test/syscalls/linux/socket_ip_udp_generic.cc
index 8a87f2667..2f45bb5ad 100644
--- a/test/syscalls/linux/socket_ip_udp_generic.cc
+++ b/test/syscalls/linux/socket_ip_udp_generic.cc
@@ -493,7 +493,7 @@ TEST_P(UDPSocketPairTest, TClassRecvMismatch) {
// This should only test AF_INET6 sockets for the mismatch behavior.
SKIP_IF(GetParam().domain != AF_INET6);
// IPV6_RECVTCLASS is only valid for SOCK_DGRAM and SOCK_RAW.
- SKIP_IF((GetParam().type != SOCK_DGRAM) | (GetParam().type != SOCK_RAW));
+ SKIP_IF((GetParam().type != SOCK_DGRAM) || (GetParam().type != SOCK_RAW));
auto sockets = ASSERT_NO_ERRNO_AND_VALUE(NewSocketPair());
diff --git a/test/syscalls/linux/tcp_socket.cc b/test/syscalls/linux/tcp_socket.cc
index bbcb7e4fd..9c0ff8780 100644
--- a/test/syscalls/linux/tcp_socket.cc
+++ b/test/syscalls/linux/tcp_socket.cc
@@ -706,7 +706,7 @@ TEST_P(TcpSocketTest, TcpInq) {
std::vector<char> control(CMSG_SPACE(sizeof(int)));
size = sizeof(buf);
struct iovec iov;
- for (int i = 0; size != 0; i += kChunk) {
+ while (size != 0) {
msg.msg_control = &control[0];
msg.msg_controllen = control.size();