summaryrefslogtreecommitdiff
path: root/lib/readutmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readutmp.c')
-rw-r--r--lib/readutmp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/readutmp.c b/lib/readutmp.c
index f89dd68f..ec6e2759 100644
--- a/lib/readutmp.c
+++ b/lib/readutmp.c
@@ -1,6 +1,6 @@
/* GNU's read utmp module.
- Copyright (C) 1992-2001, 2003-2006, 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 1992-2001, 2003-2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@ extract_trimmed_name (const STRUCT_UTMP *ut)
/* Is the utmp entry U desired by the user who asked for OPTIONS? */
-static inline bool
+static bool
desirable_utmp_entry (STRUCT_UTMP const *u, int options)
{
bool user_proc = IS_USER_PROCESS (u);
@@ -69,8 +69,8 @@ desirable_utmp_entry (STRUCT_UTMP const *u, int options)
return false;
if ((options & READ_UTMP_CHECK_PIDS)
&& user_proc
- && (UT_PID (u) <= 0
- || (kill (UT_PID (u), 0) < 0 && errno == ESRCH)))
+ && 0 < UT_PID (u)
+ && (kill (UT_PID (u), 0) < 0 && errno == ESRCH))
return false;
return true;
}