summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-30 15:15:19 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-30 15:15:19 +0200
commit921344c3ba5a0e30f04511d2039dff79b6f82dd9 (patch)
tree64c496aa9c26c38cd0f5219c79e3d2863997d2c8 /nest
parentb4336b0880dee2a039ca55321f4344444512f97d (diff)
parent3a6eda995ecfcebff3130d86ee3baeab12a41335 (diff)
Merge commit '3a6eda995ecfcebff3130d86ee3baeab12a41335' into haugesund
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-table.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 81929a0b..48a75aca 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -2212,12 +2212,7 @@ static struct resclass rt_class = {
rtable *
rt_setup(pool *pp, struct rtable_config *cf)
{
- int ns = strlen("Routing table ") + strlen(cf->name) + 1;
- void *nb = mb_alloc(pp, ns);
- ASSERT_DIE(ns - 1 == bsnprintf(nb, ns, "Routing table %s", cf->name));
-
- pool *p = rp_new(pp, nb);
- mb_move(nb, p);
+ pool *p = rp_newf(pp, "Routing table %s", cf->name);
rtable *t = ralloc(p, &rt_class);
t->rp = p;