mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fixed compiler warning in PageProtect function family.
This commit is contained in:
parent
69c23aed56
commit
c518a37bef
1 changed files with 6 additions and 3 deletions
|
@ -573,7 +573,8 @@ namespace Sortix
|
|||
void PageProtect(addr_t mapto, int protection)
|
||||
{
|
||||
addr_t phys;
|
||||
LookUp(mapto, &phys, NULL);
|
||||
if ( !LookUp(mapto, &phys, NULL) )
|
||||
return;
|
||||
Map(phys, mapto, protection);
|
||||
}
|
||||
|
||||
|
@ -581,7 +582,8 @@ namespace Sortix
|
|||
{
|
||||
addr_t phys;
|
||||
int prot;
|
||||
LookUp(mapto, &phys, &prot);
|
||||
if ( !LookUp(mapto, &phys, &prot) )
|
||||
return;
|
||||
prot |= protection;
|
||||
Map(phys, mapto, prot);
|
||||
}
|
||||
|
@ -590,7 +592,8 @@ namespace Sortix
|
|||
{
|
||||
addr_t phys;
|
||||
int prot;
|
||||
LookUp(mapto, &phys, &prot);
|
||||
if ( !LookUp(mapto, &phys, &prot) )
|
||||
return;
|
||||
prot &= ~protection;
|
||||
Map(phys, mapto, prot);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue