Skip to content

Commit

Permalink
selinux: drop return statement at end of void functions
Browse files Browse the repository at this point in the history
Those return statements at the end of a void function are redundant.

Reported by clang-tidy [readability-redundant-control-flow]

Signed-off-by: Christian Göttsche <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
cgzones authored and pcmoore committed Feb 18, 2022
1 parent 3eb8eaf commit 5ea33af
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions security/selinux/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3284,8 +3284,6 @@ static void selinux_inode_post_setxattr(struct dentry *dentry, const char *name,
isec->sid = newsid;
isec->initialized = LABEL_INITIALIZED;
spin_unlock(&isec->lock);

return;
}

static int selinux_inode_getxattr(struct dentry *dentry, const char *name)
Expand Down
2 changes: 0 additions & 2 deletions security/selinux/ss/conditional.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,6 @@ void cond_compute_xperms(struct avtab *ctab, struct avtab_key *key,
if (node->key.specified & AVTAB_ENABLED)
services_compute_xperms_decision(xpermd, node);
}
return;

}
/* Determine whether additional permissions are granted by the conditional
* av table, and if so, add them to the result
Expand Down
1 change: 0 additions & 1 deletion security/selinux/ss/ebitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ void ebitmap_destroy(struct ebitmap *e)

e->highbit = 0;
e->node = NULL;
return;
}

int ebitmap_read(struct ebitmap *e, void *fp)
Expand Down
1 change: 0 additions & 1 deletion security/selinux/ss/mls.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ void mls_sid_to_context(struct policydb *p,
}

*scontext = scontextp;
return;
}

int mls_level_isvalid(struct policydb *p, struct mls_level *l)
Expand Down
2 changes: 0 additions & 2 deletions security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,6 @@ static void security_dump_masked_av(struct policydb *policydb,
/* release scontext/tcontext */
kfree(tcontext_name);
kfree(scontext_name);

return;
}

/*
Expand Down

0 comments on commit 5ea33af

Please sign in to comment.