git: e6dc191e43ac - stable/14 - bitset: Fix __BIT_FFS_AT()'s herald comment
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 04 Oct 2024 08:45:43 UTC
The branch stable/14 has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=e6dc191e43ac25492890a1227983de5e2d811db8
commit e6dc191e43ac25492890a1227983de5e2d811db8
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-06-03 19:22:12 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2024-10-04 08:42:41 +0000
bitset: Fix __BIT_FFS_AT()'s herald comment
The manual page is correct though.
No functional change.
Reviewed by: emaste
Approved by: emaste (mentor)
MFC after: 3 days
Event: Kitchener-Waterloo Hackathon 202406
Sponsored by: The FreeBSD Foundation
(cherry picked from commit f3ab0d86e8070c73bf2e2852341f8e5c709f5682)
Approved by: emaste (mentor)
---
sys/sys/bitset.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys/sys/bitset.h b/sys/sys/bitset.h
index 4afac9b172e8..2b26e8bcdbf9 100644
--- a/sys/sys/bitset.h
+++ b/sys/sys/bitset.h
@@ -232,8 +232,9 @@
} while (0)
/*
- * Note that `start` and the returned value from __BIT_FFS_AT are
- * 1-based bit indices.
+ * 'start' and 'end' are 0-based bit (runtime) indices. Note that, as for ffs(),
+ * the returned index is 1-based, 0 being reserved to indicate that no bits are
+ * set.
*/
#define __BIT_FFS_AT(_s, p, start) __extension__ ({ \
__size_t __i; \