[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230815204644.52358-1-atulpant.linux@gmail.com>
Date: Wed, 16 Aug 2023 02:16:44 +0530
From: Atul Kumar Pant <atulpant.linux@...il.com>
To: paul@...l-moore.com, eparis@...hat.com
Cc: Atul Kumar Pant <atulpant.linux@...il.com>, audit@...r.kernel.org,
linux-kernel@...r.kernel.org, shuah@...nel.org
Subject: [PATCH v1] kernel: auditsc: Removes use of assignment in if condition and moves open brace following function definitions to the next line.
The patch fixes following checkpatch.pl issue:
ERROR: open brace '{' following function definitions go on the next line
ERROR: do not use assignment in if condition
Signed-off-by: Atul Kumar Pant <atulpant.linux@...il.com>
---
kernel/auditsc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index a674039ea9ef..d88ebc911277 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -880,7 +880,8 @@ static void audit_filter_syscall(struct task_struct *tsk,
*/
static int audit_filter_inode_name(struct task_struct *tsk,
struct audit_names *n,
- struct audit_context *ctx) {
+ struct audit_context *ctx)
+{
int h = audit_hash_ino((u32)n->ino);
struct list_head *list = &audit_inode_hash[h];
@@ -1064,7 +1065,8 @@ int audit_alloc(struct task_struct *tsk)
return 0;
}
- if (!(context = audit_alloc_context(state))) {
+ context = audit_alloc_context(state);
+ if (!context) {
kfree(key);
audit_log_lost("out of memory in audit_alloc");
return -ENOMEM;
--
2.25.1
Powered by blists - more mailing lists