Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1341878 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2016-02-24 12:20 +0100 |
| Last post | 2016-03-01 17:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] tty: audit: remove unused variable Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-02-24 12:20 +0100
Re: [PATCH v2] tty: audit: remove unused variable Peter Hurley <peter@hurleysoftware.com> - 2016-03-01 17:20 +0100
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-02-24 12:20 +0100 |
| Subject | [PATCH v2] tty: audit: remove unused variable |
| Message-ID | <r5FE6-3ID-19@gated-at.bofh.it> |
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>
---
v2: audit_get_loginuid() also removed.
drivers/tty/tty_audit.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c
index 66d53fc..df2d735 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);
- }
}
/**
--
1.9.1
[toc] | [next] | [standalone]
| From | Peter Hurley <peter@hurleysoftware.com> |
|---|---|
| Date | 2016-03-01 17:20 +0100 |
| Message-ID | <r7VbI-31f-17@gated-at.bofh.it> |
| In reply to | #1341878 |
On 02/24/2016 03:15 AM, Sudip Mukherjee wrote: > 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. Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web