summaryrefslogtreecommitdiff
path: root/lib/prefix.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/prefix.c')
-rw-r--r--lib/prefix.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/prefix.c b/lib/prefix.c
index 739764842d..43331d1552 100644
--- a/lib/prefix.c
+++ b/lib/prefix.c
@@ -766,14 +766,15 @@ str2prefix (const char *str, struct prefix *p)
return 0;
}
-int
-prefix2str (const struct prefix *p, char *str, int size)
+const char *
+prefix2str (union prefix46constptr pu, char *str, int size)
{
+ const struct prefix *p = pu.p;
char buf[BUFSIZ];
inet_ntop (p->family, &p->u.prefix, buf, BUFSIZ);
snprintf (str, size, "%s/%d", buf, p->prefixlen);
- return 0;
+ return str;
}
struct prefix *