Date: Thu, 2 May 2024 13:26:45 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: bff26fe7aa07 - stable/14 - wg: uma_zcreate() does not fail Message-ID: <202405021326.442DQjo7080736@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bff26fe7aa07173729bff549a00cc355bc977baf commit bff26fe7aa07173729bff549a00cc355bc977baf Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-04-23 16:19:08 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-05-02 13:25:08 +0000 wg: uma_zcreate() does not fail No functional change intended. MFC after: 1 week (cherry picked from commit b6a0ed7c78dd45937e404706620467bef61c308d) --- sys/dev/wg/if_wg.c | 6 +++--- sys/dev/wg/wg_cookie.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index bf4eef31c0b3..2c867956912a 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2989,9 +2989,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); diff --git a/sys/dev/wg/wg_cookie.c b/sys/dev/wg/wg_cookie.c index 6ff9325c6613..80617d473471 100644 --- a/sys/dev/wg/wg_cookie.c +++ b/sys/dev/wg/wg_cookie.c @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405021326.442DQjo7080736>