git: 542e14a59bca - stable/14 - queue(3): Wrap QMD_ASSERT()'s guard with __predict_false()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 01 May 2025 19:51:51 UTC
The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=542e14a59bcaf97d7faed9f8d3fc5fed20625e3a commit 542e14a59bcaf97d7faed9f8d3fc5fed20625e3a Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-04-22 14:26:22 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-05-01 19:46:38 +0000 queue(3): Wrap QMD_ASSERT()'s guard with __predict_false() Such a guard is bound to be almost always false (obviously). Reviewed by: emaste (older version) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49974 (cherry picked from commit 613d66b5e17d92e5304fdc9abe4c62ba015ebf31) --- sys/sys/queue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index e88e3ad69ca3..5dabb1a241c2 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -210,7 +210,7 @@ struct qm_trace { #ifndef QMD_ASSERT #define QMD_ASSERT(expression, fmt, ...) do { \ - if (!(expression)) \ + if (__predict_false(!(expression))) \ QMD_PANIC("%s:%u: %s: " fmt, \ __FILE__, __LINE__, __func__, ##__VA_ARGS__); \ } while (0)