History

audit: change decimal constant to macro for invalid uid

SFR reported this 2013-05-15: > After merging the final tree, today's linux-next build (i386 defconfig) > produced this warning: > > kernel/auditfilter.c: In function 'audit_data_to_entry': > kernel/auditfilter.c:426:3: warning: this decimal constant is unsigned only > in ISO C90 [enabled by default] > > Introduced by commit 780a7654cee8 ("audit: Make testing for a valid > loginuid explicit") from Linus' tree. Replace this decimal constant in the code with a macro to make it more readable (add to the unsigned cast to quiet the warning).

Richard Guy Briggs committed 13 years ago

Commit 42f74461 parent 0868a5e2 files · +3 −1Browse files

Showing the changes to include/uapi/linux (1 of 2 files). Show all

Unified · Split

include/uapi/linux/audit.h+2−0
@@ -380,6 +380,8 @@ struct audit_tty_status { · 379 unmodified lines
380 __u32 log_passwd; /* 1 = enabled, 0 = disabled */380 __u32 log_passwd; /* 1 = enabled, 0 = disabled */
381};381};
382 382
383#define AUDIT_UID_UNSET (unsigned int)-1
384
383/* audit_rule_data supports filter rules with both integer and string385/* audit_rule_data supports filter rules with both integer and string
384 * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and386 * fields. It corresponds with AUDIT_ADD_RULE, AUDIT_DEL_RULE and
385 * AUDIT_LIST_RULES requests.387 * AUDIT_LIST_RULES requests.