summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-04-01 21:26:53 +0200
committerGitHub <noreply@github.com>2022-04-01 21:26:53 +0200
commit2d5bac3f7e70d0a9fff984cd90d1be3ebfd08a1c (patch)
treeebc5cebf67e9f23873ab7a8103a05367a3bd63df /tests
parentMerge pull request #10942 from opensourcerouting/feature/printfrr_extension_f... (diff)
parenttests: Fix uninitialized usage of variables in tests (diff)
downloadfrr-2d5bac3f7e70d0a9fff984cd90d1be3ebfd08a1c.tar.xz
frr-2d5bac3f7e70d0a9fff984cd90d1be3ebfd08a1c.zip
Merge pull request #10950 from donaldsharp/uninit_test
tests: Fix uninitialized usage of variables in tests
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/test_frrlua.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/lib/test_frrlua.c b/tests/lib/test_frrlua.c
index a81446f9c..fb6b77c0f 100644
--- a/tests/lib/test_frrlua.c
+++ b/tests/lib/test_frrlua.c
@@ -61,7 +61,7 @@ static void test_encode_decode(void)
assert(strncmp(p_a_str, p_b_str, sizeof(p_b_str)) == 0);
assert(lua_gettop(L) == 0);
- struct interface ifp_a;
+ struct interface ifp_a = {};
struct interface ifp_b = ifp_a;
lua_pushinterface(L, &ifp_a);
@@ -79,7 +79,7 @@ static void test_encode_decode(void)
assert(ifp_a.ll_type == ifp_b.ll_type);
assert(lua_gettop(L) == 0);
- struct in_addr addr_a;
+ struct in_addr addr_a = {};
struct in_addr addr_b = addr_a;
lua_pushinaddr(L, &addr_a);
@@ -87,7 +87,7 @@ static void test_encode_decode(void)
assert(addr_a.s_addr == addr_b.s_addr);
assert(lua_gettop(L) == 0);
- struct in6_addr in6addr_a;
+ struct in6_addr in6addr_a = {};
struct in6_addr in6addr_b = in6addr_a;
lua_pushin6addr(L, &in6addr_a);