summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_audit.c
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2018-06-05 19:20:39 -0400
committerPaul Moore <paul@paul-moore.com>2018-06-19 10:43:55 -0400
commitf7859590d97614815b35a755c8213dfb8f2766bd (patch)
tree94bb23b92b5ce6c2f24fb5acc187a1bbd8318c5f /drivers/tty/tty_audit.c
parentd904ac0320d3c4ff4e9d80e4294ca5dde803696f (diff)
downloadlwn-f7859590d97614815b35a755c8213dfb8f2766bd.tar.gz
lwn-f7859590d97614815b35a755c8213dfb8f2766bd.zip
audit: eliminate audit_enabled magic number comparison
Remove comparison of audit_enabled to magic numbers outside of audit. Related: https://github.com/linux-audit/audit-kernel/issues/86 Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'drivers/tty/tty_audit.c')
-rw-r--r--drivers/tty/tty_audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c
index e30aa6bf9ff9..50f567b6a66e 100644
--- a/drivers/tty/tty_audit.c
+++ b/drivers/tty/tty_audit.c
@@ -92,7 +92,7 @@ static void tty_audit_buf_push(struct tty_audit_buf *buf)
{
if (buf->valid == 0)
return;
- if (audit_enabled == 0) {
+ if (audit_enabled == AUDIT_OFF) {
buf->valid = 0;
return;
}