summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2016-02-24 12:15:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-08 01:11:14 +0100
commit54555919e8a1b5881b130ed5dea8023ff009cbe7 (patch)
tree1a05017ab99a08c4a8083e413fc21532fc43d70f /drivers/tty
parentRevert "sc16is7xx: implemented get_mctrl" (diff)
downloadlinux-54555919e8a1b5881b130ed5dea8023ff009cbe7.tar.xz
linux-54555919e8a1b5881b130ed5dea8023ff009cbe7.zip
tty: audit: remove unused variable
While building with W=1 we were getting build warning: drivers/tty/tty_audit.c:149:16: warning: variable 'sessionid' set but not used The local variable sessionid was only assigned the value of current->sessionid but was never reused. On further inspection it turned out that there is no need of audit_get_loginuid() also. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/tty_audit.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c
index 66d53fcf4da0..df2d735338e2 100644
--- a/drivers/tty/tty_audit.c
+++ b/drivers/tty/tty_audit.c
@@ -144,14 +144,8 @@ void tty_audit_tiocsti(struct tty_struct *tty, char ch)
if (tty_audit_push())
return;
- if (audit_enabled) {
- kuid_t auid;
- unsigned int sessionid;
-
- auid = audit_get_loginuid(current);
- sessionid = audit_get_sessionid(current);
+ if (audit_enabled)
tty_audit_log("ioctl=TIOCSTI", dev, &ch, 1);
- }
}
/**