~ubuntu-branches/ubuntu/raring/apparmor/raring

« back to all changes in this revision

Viewing changes to kernel-patches/for-mainline/coding-style.diff

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-03-23 16:42:01 UTC
  • Revision ID: james.westby@ubuntu.com-20070323164201-jkax6f0oku087b7l
Tags: upstream-2.0.1+510.dfsg
ImportĀ upstreamĀ versionĀ 2.0.1+510.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
---
 
2
 security/apparmor/inline.h |    5 ++---
 
3
 1 file changed, 2 insertions(+), 3 deletions(-)
 
4
 
 
5
Index: linux-2.6/security/apparmor/inline.h
 
6
===================================================================
 
7
--- linux-2.6.orig/security/apparmor/inline.h
 
8
+++ linux-2.6/security/apparmor/inline.h
 
9
@@ -88,7 +88,7 @@ aa_alloc_task_context(struct task_struct
 
10
 {
 
11
        struct aa_task_context *cxt;
 
12
 
 
13
-       cxt = kzalloc(sizeof(struct aa_task_context), GFP_KERNEL);
 
14
+       cxt = kzalloc(sizeof(*cxt), GFP_KERNEL);
 
15
        if (cxt) {
 
16
                INIT_LIST_HEAD(&cxt->list);
 
17
                cxt->task = task;
 
18
@@ -110,8 +110,7 @@ static inline struct aa_profile *alloc_a
 
19
 {
 
20
        struct aa_profile *profile;
 
21
 
 
22
-       profile = (struct aa_profile *)kzalloc(sizeof(struct aa_profile),
 
23
-                                             GFP_KERNEL);
 
24
+       profile = kzalloc(sizeof(*profile), GFP_KERNEL);
 
25
        AA_DEBUG("%s(%p)\n", __FUNCTION__, profile);
 
26
        if (profile) {
 
27
                profile->parent = profile;