Date: Wed, 24 Apr 2024 13:17:13 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b6a0ed7c78dd - main - wg: uma_zcreate() does not fail Message-ID: <202404241317.43ODHD6K053422@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b6a0ed7c78dd45937e404706620467bef61c308d commit b6a0ed7c78dd45937e404706620467bef61c308d Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-04-23 16:19:08 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-04-24 12:45:40 +0000 wg: uma_zcreate() does not fail No functional change intended. MFC after: 1 week --- 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 57caa69bde3b..d0b75d5cbf4b 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -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); 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?202404241317.43ODHD6K053422>