Skip to content

Commit

Permalink
audit: do not cast audit_rule_data pointers pointlesly
Browse files Browse the repository at this point in the history
For some sort of legacy support audit_rule is a subset of (and first
entry in) audit_rule_data.  We don't actually need or use audit_rule.
We just do a cast from one to the other for no gain what so ever.  Stop
the crazy casting.

Signed-off-by: Eric Paris <eparis@redhat.com>
  • Loading branch information
Eric Paris committed Apr 2, 2014
1 parent 543bc6a commit 56c4911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/auditfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ static int audit_match_signal(struct audit_entry *entry)
#endif

/* Common user-space to kernel rule translation. */
static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule)
static inline struct audit_entry *audit_to_entry_common(struct audit_rule_data *rule)
{
unsigned listnr;
struct audit_entry *entry;
Expand Down Expand Up @@ -405,7 +405,7 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
int i;
char *str;

entry = audit_to_entry_common((struct audit_rule *)data);
entry = audit_to_entry_common(data);
if (IS_ERR(entry))
goto exit_nofree;

Expand Down

0 comments on commit 56c4911

Please sign in to comment.