selinux: fix up style problem on /selinux/status
authorKaiGai Kohei <kaigai@ak.jp.nec.com>
Thu, 30 Sep 2010 02:49:55 +0000 (11:49 +0900)
committerJames Morris <jmorris@namei.org>
Wed, 20 Oct 2010 23:12:41 +0000 (10:12 +1100)
This patch fixes up coding-style problem at this commit:

 4f27a7d49789b04404eca26ccde5f527231d01d5
 selinux: fast status update interface (/selinux/status)

Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Signed-off-by: James Morris <jmorris@namei.org>
security/selinux/include/security.h
security/selinux/ss/status.c

index e390e31bb4bf5fa2582bea1148775a023eed4517..4b66f19bb1f3cdb11f87523e617970cc573fc965 100644 (file)
@@ -197,8 +197,7 @@ const char *security_get_initial_sid_context(u32 sid);
 extern struct page *selinux_kernel_status_page(void);
 
 #define SELINUX_KERNEL_STATUS_VERSION  1
-struct selinux_kernel_status
-{
+struct selinux_kernel_status {
        u32     version;        /* version number of thie structure */
        u32     sequence;       /* sequence number of seqlock logic */
        u32     enforcing;      /* current setting of enforcing mode */
index 5d9b225f85681b88227167df5d302cfd1ca67d22..d982365f9d1a7b7c0068e87bd99c7fe3b7df151d 100644 (file)
@@ -35,7 +35,7 @@
  * In most cases, application shall confirm the kernel status is not
  * changed without any system call invocations.
  */
-static struct page *selinux_status_page = NULL;
+static struct page *selinux_status_page;
 static DEFINE_MUTEX(selinux_status_lock);
 
 /*
@@ -50,11 +50,10 @@ struct page *selinux_kernel_status_page(void)
        struct page                    *result = NULL;
 
        mutex_lock(&selinux_status_lock);
-       if (!selinux_status_page)
-       {
+       if (!selinux_status_page) {
                selinux_status_page = alloc_page(GFP_KERNEL|__GFP_ZERO);
-               if (selinux_status_page)
-               {
+
+               if (selinux_status_page) {
                        status = page_address(selinux_status_page);
 
                        status->version = SELINUX_KERNEL_STATUS_VERSION;
@@ -86,8 +85,7 @@ void selinux_status_update_setenforce(int enforcing)
        struct selinux_kernel_status   *status;
 
        mutex_lock(&selinux_status_lock);
-       if (selinux_status_page)
-       {
+       if (selinux_status_page) {
                status = page_address(selinux_status_page);
 
                status->sequence++;
@@ -112,8 +110,7 @@ void selinux_status_update_policyload(int seqno)
        struct selinux_kernel_status   *status;
 
        mutex_lock(&selinux_status_lock);
-       if (selinux_status_page)
-       {
+       if (selinux_status_page) {
                status = page_address(selinux_status_page);
 
                status->sequence++;