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, [PR_METHOD_REMOVE] = wg_prison_remove,
}; };
if ((wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet), wg_packet_zone = uma_zcreate("wg packet", sizeof(struct wg_packet),
NULL, NULL, NULL, NULL, 0, 0)) == NULL) NULL, NULL, NULL, NULL, 0, 0);
return (ENOMEM);
ret = crypto_init(); ret = crypto_init();
if (ret != 0) if (ret != 0)
return (ret); return (ret);

View file

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