vom: Fix the api type definition
@@ -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;
}
};
