Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Ricardo Robaina and committed by
Paul Moore
f3e334fb a6053fef

+3 -4
+1 -1
include/uapi/linux/audit.h
··· 508 508 __u32 log_passwd; /* 1 = enabled, 0 = disabled */ 509 509 }; 510 510 511 - #define AUDIT_UID_UNSET (unsigned int)-1 511 + #define AUDIT_UID_UNSET ((unsigned int)-1) 512 512 #define AUDIT_SID_UNSET ((unsigned int)-1) 513 513 514 514 /* audit_rule_data supports filter rules with both integer and string
+1 -2
kernel/auditfilter.c
··· 303 303 return ERR_PTR(err); 304 304 } 305 305 306 - static u32 audit_ops[] = 307 - { 306 + static u32 audit_ops[] = { 308 307 [Audit_equal] = AUDIT_EQUAL, 309 308 [Audit_not_equal] = AUDIT_NOT_EQUAL, 310 309 [Audit_bitmask] = AUDIT_BIT_MASK,
+1 -1
lib/audit.c
··· 42 42 if (audit_is_compat(abi)) 43 43 return audit_classify_compat_syscall(abi, syscall); 44 44 45 - switch(syscall) { 45 + switch (syscall) { 46 46 #ifdef __NR_open 47 47 case __NR_open: 48 48 return AUDITSC_OPEN;