Fixed compiler warning in PageProtect function family.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-08-04 13:58:13 +02:00
parent 69c23aed56
commit c518a37bef
1 changed files with 6 additions and 3 deletions

View File

@ -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);
} }