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 613d66b5e1)
This commit is contained in:
Olivier Certner 2025-04-22 16:26:22 +02:00
parent 64ca7e040a
commit 542e14a59b
No known key found for this signature in database
GPG key ID: 8CA13040971E2627

View file

@ -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)