zebra: No prototype and uninited variables

Add a header to cleanup no declaration and properly
wrapper some variables to appropriate #ifdef.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2018-08-25 18:28:19 -04:00
parent 184ce1c5d1
commit f7dae31211
2 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,7 @@
#include "zebra/interface.h"
#include "zebra/rib.h"
#include "zebra/rt.h"
#include <ifaddrs.h>

View File

@ -1558,7 +1558,9 @@ static int zvni_neigh_install(zebra_vni_t *zvni, zebra_neigh_t *n)
struct zebra_if *zif;
struct zebra_l2info_vxlan *vxl;
struct interface *vlan_if;
#ifdef GNU_LINUX
uint8_t flags;
#endif
int ret = 0;
if (!(n->flags & ZEBRA_NEIGH_REMOTE))
@ -3369,7 +3371,9 @@ static int zl3vni_nh_del(zebra_l3vni_t *zl3vni, zebra_neigh_t *n)
*/
static int zl3vni_nh_install(zebra_l3vni_t *zl3vni, zebra_neigh_t *n)
{
#ifdef GNU_LINUX
uint8_t flags;
#endif
int ret = 0;
if (!is_l3vni_oper_up(zl3vni))