projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NEWS.stable: log cherry-pick [e446f25]->[c092018] relocatable-shell: Update suggested...
[gnulib.git]
/
lib
/
readutmp.c
diff --git
a/lib/readutmp.c
b/lib/readutmp.c
index
f89dd68
..
a90290b
100644
(file)
--- a/
lib/readutmp.c
+++ b/
lib/readutmp.c
@@
-1,6
+1,6
@@
/* GNU's read utmp module.
/* GNU's read utmp module.
- Copyright (C) 1992-2001, 2003-2006, 2009-201
2
Free Software Foundation, Inc.
+ Copyright (C) 1992-2001, 2003-2006, 2009-201
4
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
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? */
/* 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);
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
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;
}
return false;
return true;
}