public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] audit.c : Code clean up
@ 2015-02-16 21:33 Ameen Ali
  2015-02-17 15:44 ` Paul Moore
  0 siblings, 1 reply; 2+ messages in thread
From: Ameen Ali @ 2015-02-16 21:33 UTC (permalink / raw)
  To: paul; +Cc: linux-audit, linux-kernel, Ameen Ali, Ameen-Ali

Fixed a coding style issue (unnecessary parentheses , unnecessary braces)

Signed-off-by: Ameen-Ali <Ameenali023@gmail.com>
---
 kernel/audit.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index 72ab759..0607e12 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -663,7 +663,7 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)
 	case AUDIT_MAKE_EQUIV:
 		/* Only support auditd and auditctl in initial pid namespace
 		 * for now. */
-		if ((task_active_pid_ns(current) != &init_pid_ns))
+		if (task_active_pid_ns(current) != &init_pid_ns)
 			return -EPERM;
 
 		if (!netlink_capable(skb, CAP_AUDIT_CONTROL))
@@ -1759,7 +1759,7 @@ void audit_log_name(struct audit_context *context, struct audit_names *n,
 	} else
 		audit_log_format(ab, " name=(null)");
 
-	if (n->ino != (unsigned long)-1) {
+	if (n->ino != (unsigned long)-1)
 		audit_log_format(ab, " inode=%lu"
 				 " dev=%02x:%02x mode=%#ho"
 				 " ouid=%u ogid=%u rdev=%02x:%02x",
@@ -1771,7 +1771,6 @@ void audit_log_name(struct audit_context *context, struct audit_names *n,
 				 from_kgid(&init_user_ns, n->gid),
 				 MAJOR(n->rdev),
 				 MINOR(n->rdev));
-	}
 	if (n->osid != 0) {
 		char *ctx = NULL;
 		u32 len;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] audit.c : Code clean up
  2015-02-16 21:33 [PATCH] audit.c : Code clean up Ameen Ali
@ 2015-02-17 15:44 ` Paul Moore
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Moore @ 2015-02-17 15:44 UTC (permalink / raw)
  To: Ameen Ali; +Cc: linux-audit, linux-kernel

On Monday, February 16, 2015 11:33:46 PM Ameen Ali wrote:
> Fixed a coding style issue (unnecessary parentheses , unnecessary braces)
> 
> Signed-off-by: Ameen-Ali <Ameenali023@gmail.com>
> ---
>  kernel/audit.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Merged into my next-queue branch, I'll push to audit#next once -rc1 is 
released.

> diff --git a/kernel/audit.c b/kernel/audit.c
> index 72ab759..0607e12 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -663,7 +663,7 @@ static int audit_netlink_ok(struct sk_buff *skb, u16
> msg_type) case AUDIT_MAKE_EQUIV:
>  		/* Only support auditd and auditctl in initial pid namespace
>  		 * for now. */
> -		if ((task_active_pid_ns(current) != &init_pid_ns))
> +		if (task_active_pid_ns(current) != &init_pid_ns)
>  			return -EPERM;
> 
>  		if (!netlink_capable(skb, CAP_AUDIT_CONTROL))
> @@ -1759,7 +1759,7 @@ void audit_log_name(struct audit_context *context,
> struct audit_names *n, } else
>  		audit_log_format(ab, " name=(null)");
> 
> -	if (n->ino != (unsigned long)-1) {
> +	if (n->ino != (unsigned long)-1)
>  		audit_log_format(ab, " inode=%lu"
>  				 " dev=%02x:%02x mode=%#ho"
>  				 " ouid=%u ogid=%u rdev=%02x:%02x",
> @@ -1771,7 +1771,6 @@ void audit_log_name(struct audit_context *context,
> struct audit_names *n, from_kgid(&init_user_ns, n->gid),
>  				 MAJOR(n->rdev),
>  				 MINOR(n->rdev));
> -	}
>  	if (n->osid != 0) {
>  		char *ctx = NULL;
>  		u32 len;

-- 
paul moore
www.paul-moore.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-17 15:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-16 21:33 [PATCH] audit.c : Code clean up Ameen Ali
2015-02-17 15:44 ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox