summaryrefslogtreecommitdiff
path: root/src/shared/utmp-wtmp.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-30 01:38:36 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-31 14:28:36 -0400
commit4dd1de72e8e7ece77e8831e77eea650de404af75 (patch)
tree11193d7a3798b1bf4f592304af1e8efe9d46f770 /src/shared/utmp-wtmp.c
parenta7edaadd78271e1c35ff9032f068cb08de645437 (diff)
Remove some dead code
Based on coverity report.
Diffstat (limited to 'src/shared/utmp-wtmp.c')
-rw-r--r--src/shared/utmp-wtmp.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
index 0a0180979b..c9b986fc08 100644
--- a/src/shared/utmp-wtmp.c
+++ b/src/shared/utmp-wtmp.c
@@ -77,15 +77,11 @@ int utmp_get_runlevel(int *runlevel, int *previous) {
a = found->ut_pid & 0xFF;
b = (found->ut_pid >> 8) & 0xFF;
- if (a < 0 || b < 0)
- r = -EIO;
- else {
- *runlevel = a;
+ *runlevel = a;
+ if (previous)
+ *previous = b;
- if (previous)
- *previous = b;
- r = 0;
- }
+ r = 0;
}
endutxent();