Improve comment for compat32 handling of sysctl hw.pagesizes.
Explain why truncation works as intended. Reformat. Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
6820cbed71
commit
a2b127ae7b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=361079
@ -238,8 +238,9 @@ sysctl_hw_pagesizes(SYSCTL_HANDLER_ARGS)
|
||||
|
||||
if (req->flags & SCTL_MASK32) {
|
||||
/*
|
||||
* Recreate the "pagesizes" array with 32-bit elements. Truncate
|
||||
* any page size greater than UINT32_MAX to zero.
|
||||
* Recreate the "pagesizes" array with 32-bit elements.
|
||||
* Truncate any page size greater than UINT32_MAX to zero,
|
||||
* which assumes that page sizes are powers of two.
|
||||
*/
|
||||
for (i = 0; i < MAXPAGESIZES; i++)
|
||||
pagesizes32[i] = (uint32_t)pagesizes[i];
|
||||
|
Loading…
Reference in New Issue
Block a user