Date: Tue, 3 Sep 2024 10:26:43 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 6a2a385507c7 - main - kern_fail: Stop checking for failures from fp_malloc(M_WAITOK) Message-ID: <202409031026.483AQhUJ008710@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6a2a385507c79abaa9db9eabfdd827362f3dc7ed commit 6a2a385507c79abaa9db9eabfdd827362f3dc7ed Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:16 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-03 10:25:16 +0000 kern_fail: Stop checking for failures from fp_malloc(M_WAITOK) `fp_malloc` is defined as a macro that redirects to `malloc`. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 --- sys/kern/kern_fail.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_fail.c b/sys/kern/kern_fail.c index 883b664aef0d..258268bb874f 100644 --- a/sys/kern/kern_fail.c +++ b/sys/kern/kern_fail.c @@ -479,11 +479,10 @@ fail_point_init(struct fail_point *fp, const char *fmt, ...) /* Allocate the name and fill it in. */ name = fp_malloc(n + 1, M_WAITOK); - if (name != NULL) { - va_start(ap, fmt); - vsnprintf(name, n + 1, fmt, ap); - va_end(ap); - } + va_start(ap, fmt); + vsnprintf(name, n + 1, fmt, ap); + va_end(ap); + fp->fp_name = name; fp->fp_location = ""; fp->fp_flags |= FAIL_POINT_DYNAMIC_NAME;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409031026.483AQhUJ008710>