mirror of
https://github.com/opnsense/src.git
synced 2026-03-11 02:31:16 -04:00
Use an explicit cast to avoid relying on sign extension to do the
right thing in code such as `vm_pindex_t x = ~SWAP_META_MASK'. Reviewed by: dillon
This commit is contained in:
parent
8f42fb8fc9
commit
5125fe4f45
1 changed files with 2 additions and 2 deletions
|
|
@ -1649,7 +1649,7 @@ swp_pager_hash(vm_object_t object, vm_pindex_t index)
|
|||
struct swblock **pswap;
|
||||
struct swblock *swap;
|
||||
|
||||
index &= ~SWAP_META_MASK;
|
||||
index &= ~(vm_pindex_t)SWAP_META_MASK;
|
||||
pswap = &swhash[(index ^ (int)(intptr_t)object) & swhash_mask];
|
||||
while ((swap = *pswap) != NULL) {
|
||||
if (swap->swb_object == object &&
|
||||
|
|
@ -1731,7 +1731,7 @@ retry:
|
|||
|
||||
swap->swb_hnext = NULL;
|
||||
swap->swb_object = object;
|
||||
swap->swb_index = index & ~SWAP_META_MASK;
|
||||
swap->swb_index = index & ~(vm_pindex_t)SWAP_META_MASK;
|
||||
swap->swb_count = 0;
|
||||
|
||||
++object->un_pager.swp.swp_bcount;
|
||||
|
|
|
|||
Loading…
Reference in a new issue