mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-29 21:38:15 +00:00
add minor cleanup to match up with recommendations from the kernel
CodingStyle documentation
This commit is contained in:
parent
8fb0f8f3d1
commit
c0b7fc812d
27
kernel-patches/for-mainline/coding-style.diff
Normal file
27
kernel-patches/for-mainline/coding-style.diff
Normal 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;
|
@ -101,3 +101,4 @@ security-xattr-file.diff
|
|||||||
file-handle-ops.diff
|
file-handle-ops.diff
|
||||||
file-handle-ops-2.diff
|
file-handle-ops-2.diff
|
||||||
# unlink.diff
|
# unlink.diff
|
||||||
|
coding-style.diff
|
||||||
|
Loading…
x
Reference in New Issue
Block a user