summaryrefslogtreecommitdiff
path: root/lib/readutmp.c
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-02-16 14:42:43 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-02-16 14:42:43 +0000
commit7548e75065063dae256d94e6c7f4f9f43bd7f210 (patch)
treef23b000f8822f6eb70249c1106a3275deaa03bac /lib/readutmp.c
parentddefcddae2e97579f82320f4fd70d0ba14a52392 (diff)
parent974ab3dd887985e3aa347f3c6521f819296396a0 (diff)
downloadcoreutils-7548e75065063dae256d94e6c7f4f9f43bd7f210.tar.gz
Merge tag 'upstream/8.21'
Upstream version 8.21
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;
}