summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/prefix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/prefix.c b/lib/prefix.c
index c6922036..2afaa09c 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -379,7 +379,7 @@ str2prefix_ipv6 (const char *str, struct prefix_ipv6 *p)
if (pnt == NULL)
{
ret = inet_pton (AF_INET6, str, &p->prefix);
- if (ret != 1)
+ if (ret == 0)
return 0;
p->prefixlen = IPV6_MAX_BITLEN;
}
@@ -392,7 +392,7 @@ str2prefix_ipv6 (const char *str, struct prefix_ipv6 *p)
*(cp + (pnt - str)) = '\0';
ret = inet_pton (AF_INET6, cp, &p->prefix);
free (cp);
- if (ret != 1)
+ if (ret == 0)
return 0;
plen = (u_char) atoi (++pnt);
if (plen > 128)