summaryrefslogtreecommitdiff
path: root/zebra
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2011-04-11 16:33:20 +0100
committerDenis Ovsienko <infrastation@yandex.ru>2011-10-17 18:43:59 +0400
commitf17b65213712f324314c58866c4f4f8ed9c95dc7 (patch)
tree4b840c844ee34f5d352136dfb22c690982465a34 /zebra
parent4b6a7b902065e038f415a8b728df1709db00425d (diff)
zebra: trivial warning fix
* zebra_routemap.c: (route_set_src) get rid of the dummy family variable.
Diffstat (limited to 'zebra')
-rw-r--r--zebra/zebra_routemap.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c
index 808dcf74..b3111b8e 100644
--- a/zebra/zebra_routemap.c
+++ b/zebra/zebra_routemap.c
@@ -642,17 +642,14 @@ route_set_src (void *rule, struct prefix *prefix,
static void *
route_set_src_compile (const char *arg)
{
- sa_family_t family;
union g_addr src, *psrc;
- if (inet_pton(AF_INET, arg, &src.ipv4) > 0)
- family = AF_INET;
+ if (inet_pton(AF_INET, arg, &src.ipv4) != 1
#ifdef HAVE_IPV6
- else if (inet_pton(AF_INET6, arg, &src.ipv6) > 0)
- family = AF_INET6;
+ && inet_pton(AF_INET6, arg, &src.ipv6) != 1
#endif /* HAVE_IPV6 */
- else
- return NULL;
+ )
+ return NULL;
psrc = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (union g_addr));
*psrc = src;