add minor cleanup to match up with recommendations from the kernel

CodingStyle documentation
This commit is contained in:
Jesse Michael 2007-03-12 18:39:53 +00:00
parent 8fb0f8f3d1
commit c0b7fc812d
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,27 @@
---
security/apparmor/inline.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: linux-2.6/security/apparmor/inline.h
===================================================================
--- linux-2.6.orig/security/apparmor/inline.h
+++ linux-2.6/security/apparmor/inline.h
@@ -88,7 +88,7 @@ aa_alloc_task_context(struct task_struct
{
struct aa_task_context *cxt;
- cxt = kzalloc(sizeof(struct aa_task_context), GFP_KERNEL);
+ cxt = kzalloc(sizeof(*cxt), GFP_KERNEL);
if (cxt) {
INIT_LIST_HEAD(&cxt->list);
cxt->task = task;
@@ -110,8 +110,7 @@ static inline struct aa_profile *alloc_a
{
struct aa_profile *profile;
- profile = (struct aa_profile *)kzalloc(sizeof(struct aa_profile),
- GFP_KERNEL);
+ profile = kzalloc(sizeof(*profile), GFP_KERNEL);
AA_DEBUG("%s(%p)\n", __FUNCTION__, profile);
if (profile) {
profile->parent = profile;

View file

@ -101,3 +101,4 @@ security-xattr-file.diff
file-handle-ops.diff
file-handle-ops-2.diff
# unlink.diff
coding-style.diff