diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/utmp-wtmp.c | 12 |
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(); |