summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/ip6tables.cc
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2020-10-09 11:28:57 -0700
committergVisor bot <gvisor-bot@google.com>2020-10-09 11:30:52 -0700
commit33d6622172a85209f644840409d1b00ae94d609c (patch)
tree3d53336c714ea38df9aa02f70c0ed11f53c3d728 /test/syscalls/linux/ip6tables.cc
parent76a09f0cf5994bae5684fc80b7e7da6161b52975 (diff)
test/syscall/iptables: don't use designated initializers
test/syscalls/linux/iptables.cc:130:3: error: C99 designator 'name' outside aggregate initializer 130 | }; | PiperOrigin-RevId: 336331738
Diffstat (limited to 'test/syscalls/linux/ip6tables.cc')
-rw-r--r--test/syscalls/linux/ip6tables.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/syscalls/linux/ip6tables.cc b/test/syscalls/linux/ip6tables.cc
index de0a1c114..e0e146067 100644
--- a/test/syscalls/linux/ip6tables.cc
+++ b/test/syscalls/linux/ip6tables.cc
@@ -89,12 +89,12 @@ TEST(IP6TablesBasic, GetRevision) {
ASSERT_THAT(sock = socket(AF_INET6, SOCK_RAW, IPPROTO_RAW),
SyscallSucceeds());
- struct xt_get_revision rev = {
- .name = "REDIRECT",
- .revision = 0,
- };
+ struct xt_get_revision rev = {};
socklen_t rev_len = sizeof(rev);
+ snprintf(rev.name, sizeof(rev.name), "REDIRECT");
+ rev.revision = 0;
+
// Revision 0 exists.
EXPECT_THAT(
getsockopt(sock, SOL_IPV6, IP6T_SO_GET_REVISION_TARGET, &rev, &rev_len),