aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--extras/vom/vom/api_types.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/extras/vom/vom/api_types.cpp b/extras/vom/vom/api_types.cpp
index 1bde8be9dcc..9615410a036 100644
--- a/extras/vom/vom/api_types.cpp
+++ b/extras/vom/vom/api_types.cpp
@@ -71,11 +71,13 @@ from_api(const vapi_type_prefix& v)
return route::prefix_t(from_api(v.address), v.address_length);
}
-void
-to_api(const route::prefix_t& p, vapi_type_prefix& v)
+vapi_type_prefix
+to_api(const route::prefix_t& p)
{
+ vapi_type_prefix v;
to_api(p.address(), v.address);
v.address_length = p.mask_width();
+ return v;
}
};