Date: Thu, 27 Feb 2025 21:05:32 GMT From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d3c4b002d1fd - main - queue: Fix STAILQ_ASSERT_EMPTY() Message-ID: <202502272105.51RL5WB1085995@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=d3c4b002d1fd54ac69c1714e208051867ee56dc4 commit d3c4b002d1fd54ac69c1714e208051867ee56dc4 Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2025-02-27 20:59:41 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2025-02-27 21:04:17 +0000 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 --- sys/sys/queue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/sys/queue.h b/sys/sys/queue.h index 6e4da0fa0bec..70d13ee92617 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -358,7 +358,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) @@ -372,7 +372,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) */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502272105.51RL5WB1085995>