git: 6a654950dd5f - stable/14 - cred: crget(): Compute initial 'cr_agroups' with nitems()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Jan 2025 18:08:18 UTC
The branch stable/14 has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=6a654950dd5ff32efdaeb0f3e622a2f04212c51b
commit 6a654950dd5ff32efdaeb0f3e622a2f04212c51b
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-07-16 20:32:19 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-01-16 18:06:56 +0000
cred: crget(): Compute initial 'cr_agroups' with nitems()
No functional change (intended).
Reviewed by: mhorne, emaste
Approved by: markj (mentor)
MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46910
(cherry picked from commit f5b46856918cc6cc3ea49e3ab95163d318563ece)
---
sys/kern/kern_prot.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 44a1f26767ed..3510dc16f731 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -2119,8 +2119,7 @@ crget(void)
mac_cred_init(cr);
#endif
cr->cr_groups = cr->cr_smallgroups;
- cr->cr_agroups =
- sizeof(cr->cr_smallgroups) / sizeof(cr->cr_smallgroups[0]);
+ cr->cr_agroups = nitems(cr->cr_smallgroups);
return (cr);
}