]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fuzz: explicitly set initial value of global variables
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 11 Nov 2018 16:58:17 +0000 (01:58 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 11 Nov 2018 16:58:17 +0000 (01:58 +0900)
src/fuzz/fuzz-dhcp6-client.c
src/fuzz/fuzz-ndisc-rs.c

index 0417062c5fdee80748fc798a59af81b43fe6e478..c9bc2b381553d95431691659d0f431529e4fd2ae 100644 (file)
@@ -10,7 +10,7 @@
 #include "fd-util.h"
 #include "fuzz.h"
 
-static int test_dhcp_fd[2];
+static int test_dhcp_fd[2] = { -1, -1 };
 
 int dhcp6_network_send_udp_socket(int s, struct in6_addr *server_address,
                                   const void *packet, size_t len) {
index 9c017acdeb1a42b791a2445e79bbe6b324d8cfbd..389b545ac27ce14801d07727e5b8e394f0153bb3 100644 (file)
@@ -10,7 +10,7 @@
 #include "socket-util.h"
 #include "ndisc-internal.h"
 
-static int test_fd[2];
+static int test_fd[2] = { -1, -1 };
 
 int icmp6_bind_router_solicitation(int index) {
         assert_se(socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, test_fd) >= 0);