Skip to content

Commit f3e334f

Browse files
rprobainapcmoore
authored andcommitted
audit: fix coding style issues
Fix various coding style issues across the audit subsystem flagged by checkpatch.pl script to adhere to kernel coding standards. Specific changes include: - kernel/auditfilter.c: Move the open brace '{' to the previous line for the audit_ops array declaration. - lib/audit.c: Add a required space before the open parenthesis '('. - include/uapi/linux/audit.h: Enclose the complex macro value for AUDIT_UID_UNSET in parentheses. Signed-off-by: Ricardo Robaina <rrobaina@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent a6053fe commit f3e334f

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

include/uapi/linux/audit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ struct audit_tty_status {
508508
__u32 log_passwd; /* 1 = enabled, 0 = disabled */
509509
};
510510

511-
#define AUDIT_UID_UNSET (unsigned int)-1
511+
#define AUDIT_UID_UNSET ((unsigned int)-1)
512512
#define AUDIT_SID_UNSET ((unsigned int)-1)
513513

514514
/* audit_rule_data supports filter rules with both integer and string

kernel/auditfilter.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,7 @@ static inline struct audit_entry *audit_to_entry_common(struct audit_rule_data *
303303
return ERR_PTR(err);
304304
}
305305

306-
static u32 audit_ops[] =
307-
{
306+
static u32 audit_ops[] = {
308307
[Audit_equal] = AUDIT_EQUAL,
309308
[Audit_not_equal] = AUDIT_NOT_EQUAL,
310309
[Audit_bitmask] = AUDIT_BIT_MASK,

lib/audit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ int audit_classify_syscall(int abi, unsigned syscall)
4242
if (audit_is_compat(abi))
4343
return audit_classify_compat_syscall(abi, syscall);
4444

45-
switch(syscall) {
45+
switch (syscall) {
4646
#ifdef __NR_open
4747
case __NR_open:
4848
return AUDITSC_OPEN;

0 commit comments

Comments
 (0)