Fixed compiler warning in PageProtect function family.
This commit is contained in:
parent
69c23aed56
commit
c518a37bef
|
@ -573,7 +573,8 @@ namespace Sortix
|
||||||
void PageProtect(addr_t mapto, int protection)
|
void PageProtect(addr_t mapto, int protection)
|
||||||
{
|
{
|
||||||
addr_t phys;
|
addr_t phys;
|
||||||
LookUp(mapto, &phys, NULL);
|
if ( !LookUp(mapto, &phys, NULL) )
|
||||||
|
return;
|
||||||
Map(phys, mapto, protection);
|
Map(phys, mapto, protection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,7 +582,8 @@ namespace Sortix
|
||||||
{
|
{
|
||||||
addr_t phys;
|
addr_t phys;
|
||||||
int prot;
|
int prot;
|
||||||
LookUp(mapto, &phys, &prot);
|
if ( !LookUp(mapto, &phys, &prot) )
|
||||||
|
return;
|
||||||
prot |= protection;
|
prot |= protection;
|
||||||
Map(phys, mapto, prot);
|
Map(phys, mapto, prot);
|
||||||
}
|
}
|
||||||
|
@ -590,7 +592,8 @@ namespace Sortix
|
||||||
{
|
{
|
||||||
addr_t phys;
|
addr_t phys;
|
||||||
int prot;
|
int prot;
|
||||||
LookUp(mapto, &phys, &prot);
|
if ( !LookUp(mapto, &phys, &prot) )
|
||||||
|
return;
|
||||||
prot &= ~protection;
|
prot &= ~protection;
|
||||||
Map(phys, mapto, prot);
|
Map(phys, mapto, prot);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue