Clean up MFS a bit:
- Remove unused includes. - Add include guards to headers. - Use unsigned variables in case they're never going to hold a negative value. This causes GCC's complaints to disappear and should make flexelint a lot happier, too. - Make functions private when they're used only within a module. - Remove unused variables. - Add casts where appropriate.
This commit is contained in:
@@ -137,7 +137,7 @@ cpf_grant_direct(endpoint_t who_to, vir_bytes addr, size_t bytes, int access)
|
||||
|
||||
/* Get new slot to put new grant in. */
|
||||
if((g = cpf_new_grantslot()) < 0)
|
||||
return -1;
|
||||
return(GRANT_INVALID);
|
||||
|
||||
assert(GRANT_VALID(g));
|
||||
assert(g >= 0);
|
||||
@@ -146,7 +146,7 @@ cpf_grant_direct(endpoint_t who_to, vir_bytes addr, size_t bytes, int access)
|
||||
|
||||
if((r=cpf_setgrant_direct(g, who_to, addr, bytes, access)) < 0) {
|
||||
cpf_revoke(g);
|
||||
return GRANT_INVALID;
|
||||
return(GRANT_INVALID);
|
||||
}
|
||||
|
||||
return g;
|
||||
|
||||
Reference in New Issue
Block a user