wg: uma_zcreate() does not fail

No functional change intended.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2024-04-23 12:19:08 -04:00
parent 964064937e
commit b6a0ed7c78
2 changed files with 5 additions and 6 deletions

View file

@ -3135,9 +3135,9 @@ wg_module_init(void)
[PR_METHOD_REMOVE] = wg_prison_remove,
};
if ((wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet),
NULL, NULL, NULL, NULL, 0, 0)) == NULL)
return (ENOMEM);
wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet),
NULL, NULL, NULL, NULL, 0, 0);
ret = crypto_init();
if (ret != 0)
return (ret);

View file

@ -85,9 +85,8 @@ static uma_zone_t ratelimit_zone;
int
cookie_init(void)
{
if ((ratelimit_zone = uma_zcreate("wg ratelimit",
sizeof(struct ratelimit_entry), NULL, NULL, NULL, NULL, 0, 0)) == NULL)
return ENOMEM;
ratelimit_zone = uma_zcreate("wg ratelimit",
sizeof(struct ratelimit_entry), NULL, NULL, NULL, NULL, 0, 0);
ratelimit_init(&ratelimit_v4);
#ifdef INET6