]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Correctly align variable type in tests
authorDonald Sharp <sharpd@nvidia.com>
Wed, 27 Apr 2022 12:16:50 +0000 (08:16 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 29 Apr 2022 15:00:12 +0000 (15:00 +0000)
New compilers are noticing that the tests are compiling with
a pointer for the bgpd_privs variable while the bgp library
that is being linked against is not a pointer.  Since
these tests had the declaration just to make the compiler
happy, let's actually align the variable type to make the
compiler even happier.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit fcf6dce79a2e1ee4b7a5b4bb565f1755cda0d1f4)

tests/bgpd/test_aspath.c
tests/bgpd/test_capability.c
tests/bgpd/test_ecommunity.c
tests/bgpd/test_mp_attr.c
tests/bgpd/test_packet.c

index c2d39752ab4099fed1c01792ddcc90f12945c911..1dbabc940330325c106cd1f05c7f2027eeaa1ef0 100644 (file)
@@ -40,7 +40,7 @@
 #define FAILED VT100_RED "failed" VT100_RESET
 
 /* need these to link in libbgp */
-struct zebra_privs_t *bgpd_privs = NULL;
+struct zebra_privs_t bgpd_privs = {};
 struct thread_master *master = NULL;
 
 static int failed = 0;
index 3568411387f704e39b0e9d5f9419822214f5ba30..44d15d6014c3ed6f829e4589ee7ad2667525a0e4 100644 (file)
@@ -44,7 +44,7 @@
 #define OPT_PARAM  2
 
 /* need these to link in libbgp */
-struct zebra_privs_t *bgpd_privs = NULL;
+struct zebra_privs_t bgpd_privs = {};
 struct thread_master *master = NULL;
 
 static int failed = 0;
index 317bfff8ab55782828714d5f66283f74356c27d3..7147e3faf3aea08d03d0e6d905f30591c1e3c5b1 100644 (file)
@@ -30,7 +30,7 @@
 #include "bgpd/bgp_ecommunity.h"
 
 /* need these to link in libbgp */
-struct zebra_privs_t *bgpd_privs = NULL;
+struct zebra_privs_t bgpd_privs = {};
 struct thread_master *master = NULL;
 
 static int failed = 0;
index 909930d6bc97d88121419b3672b22740f5b13b89..c5ce5d3cd2c01872392c79ee859eacf16f4b1269 100644 (file)
@@ -49,7 +49,7 @@
 #define OPT_PARAM  2
 
 /* need these to link in libbgp */
-struct zebra_privs_t *bgpd_privs = NULL;
+struct zebra_privs_t bgpd_privs = {};
 struct thread_master *master = NULL;
 
 static int failed = 0;
index 27afa6a1216dd77cb97979c31185b2eec62c0a15..2ce8b561bbb14b88255dc55ca85918f5d2f2e34a 100644 (file)
@@ -37,7 +37,7 @@
 #include "bgpd/bgp_network.h"
 
 /* need these to link in libbgp */
-struct zebra_privs_t *bgpd_privs = NULL;
+struct zebra_privs_t bgpd_privs = {};
 struct thread_master *master = NULL;
 
 static struct bgp *bgp;