diff options
author | Tamir Duberstein <tamird@google.com> | 2021-02-03 16:19:20 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-03 16:21:37 -0800 |
commit | 0dbc112979ff046e15a9616e98c4febc135ce77e (patch) | |
tree | 8764dae9cb304fbb33bdd29ba01ec82fd46cdd7e /test/syscalls | |
parent | 52ad6ceeebac37350733edae86115da66305ca36 (diff) |
Compile-time constants are constexpr
PiperOrigin-RevId: 355506299
Diffstat (limited to 'test/syscalls')
-rw-r--r-- | test/syscalls/linux/socket_inet_loopback.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/syscalls/linux/socket_inet_loopback.cc b/test/syscalls/linux/socket_inet_loopback.cc index a11147085..344a5a22c 100644 --- a/test/syscalls/linux/socket_inet_loopback.cc +++ b/test/syscalls/linux/socket_inet_loopback.cc @@ -526,7 +526,7 @@ void TestListenWhileConnect(const TestParam& param, stopListen(listen_fd); for (auto& client : clients) { - const int kTimeout = 10000; + constexpr int kTimeout = 10000; struct pollfd pfd = { .fd = client.get(), .events = POLLIN, @@ -942,7 +942,7 @@ void setupTimeWaitClose(const TestAddress* listener, // shutdown to trigger TIME_WAIT. ASSERT_THAT(shutdown(active_closefd.get(), SHUT_WR), SyscallSucceeds()); { - const int kTimeout = 10000; + constexpr int kTimeout = 10000; struct pollfd pfd = { .fd = passive_closefd.get(), .events = POLLIN, @@ -1186,7 +1186,7 @@ TEST_P(SocketInetLoopbackTest, TCPAcceptAfterReset) { ASSERT_EQ(addrlen, listener.addr_len); // Wait for accept_fd to process the RST. - const int kTimeout = 10000; + constexpr int kTimeout = 10000; struct pollfd pfd = { .fd = accept_fd.get(), .events = POLLIN, |