mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-11 13:17:49 +00:00
zebra: trivial warning fix
* zebra_routemap.c: (route_set_src) get rid of the dummy family variable.
This commit is contained in:
parent
fdbc8e77c8
commit
8dd1a8daae
@ -642,17 +642,14 @@ route_set_src (void *rule, struct prefix *prefix,
|
|||||||
static void *
|
static void *
|
||||||
route_set_src_compile (const char *arg)
|
route_set_src_compile (const char *arg)
|
||||||
{
|
{
|
||||||
sa_family_t family;
|
|
||||||
union g_addr src, *psrc;
|
union g_addr src, *psrc;
|
||||||
|
|
||||||
if (inet_pton(AF_INET, arg, &src.ipv4) > 0)
|
if (inet_pton(AF_INET, arg, &src.ipv4) != 1
|
||||||
family = AF_INET;
|
|
||||||
#ifdef HAVE_IPV6
|
#ifdef HAVE_IPV6
|
||||||
else if (inet_pton(AF_INET6, arg, &src.ipv6) > 0)
|
&& inet_pton(AF_INET6, arg, &src.ipv6) != 1
|
||||||
family = AF_INET6;
|
|
||||||
#endif /* HAVE_IPV6 */
|
#endif /* HAVE_IPV6 */
|
||||||
else
|
)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
psrc = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union g_addr));
|
psrc = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union g_addr));
|
||||||
*psrc = src;
|
*psrc = src;
|
||||||
|
Loading…
Reference in New Issue
Block a user