git: 6bffebee7e57 - stable/13 - 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:22 UTC
The branch stable/13 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6bffebee7e576553006b108ed7e8518164101502 commit 6bffebee7e576553006b108ed7e8518164101502 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:44:18 +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 5ff2bb76a4ab..2e15df7de4dd 100644 --- a/sys/sys/bitset.h +++ b/sys/sys/bitset.h @@ -220,8 +220,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; \