diff options
author | Olivier Certner <olce@FreeBSD.org> | 2025-02-27 20:59:41 +0000 |
---|---|---|
committer | Olivier Certner <olce@FreeBSD.org> | 2025-02-27 21:11:10 +0000 |
commit | 4fd887f08b000173c196e954b510752025ff3fc0 (patch) | |
tree | 3208107b052a5dc708a31eee314578a0b30d5f68 | |
parent | 319b59fbde2fb90bd4e41d1f66aa59e56f66f1fe (diff) |
queue: Fix STAILQ_ASSERT_EMPTY()
The 'while' part corresponding to the 'do' was missing.
Did not notice the problem as later commits using it have been stashed
and never reworked up to now, and it is currently unused in the tree.
While here, fix spacing after the '#define' in the !(_KERNEL &&
INVARIANS) part.
Fixes: 34740937f7a4 ("queue: New debug macros for STAILQ")
MFC after: 1 minute
Sponsored by: The FreeBSD Foundation
(cherry picked from commit d3c4b002d1fd54ac69c1714e208051867ee56dc4)
-rw-r--r-- | sys/sys/queue.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 0b1e1f9fba55..31a220bcdcc0 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -356,7 +356,7 @@ struct { \ #define STAILQ_ASSERT_EMPTY(head) do { \ if (!STAILQ_EMPTY((head))) \ panic("stailq %p is not empty", (head)); \ -} +} while (0) /* * QMD_STAILQ_CHECK_TAIL(STAILQ_HEAD *head) @@ -370,7 +370,7 @@ struct { \ } while (0) #else #define QMD_STAILQ_CHECK_EMPTY(head) -#define STAILQ_ASSERT_EMPTY(head) +#define STAILQ_ASSERT_EMPTY(head) #define QMD_STAILQ_CHECK_TAIL(head) #endif /* (_KERNEL && INVARIANTS) */ |