From 6b3d5a4784fead9ed93f8ca3726848afafecbb3a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 18 Oct 2006 17:51:57 +0000 Subject: [PATCH] * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the type for a local, and rename it: s/up/user_proc/. --- ChangeLog | 5 +++++ lib/readutmp.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 131f5ce79..f86a64e5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-18 Jim Meyering + + * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the + type for a local, and rename it: s/up/user_proc/. + 2006-10-18 Sergey Poznyakoff * lib/readutmp.c (desirable_utmp_entry): Implement new flag: diff --git a/lib/readutmp.c b/lib/readutmp.c index aec1fee44..73c7b5308 100644 --- a/lib/readutmp.c +++ b/lib/readutmp.c @@ -69,11 +69,11 @@ extract_trimmed_name (const STRUCT_UTMP *ut) static inline bool desirable_utmp_entry (STRUCT_UTMP const *u, int options) { - int up = IS_USER_PROCESS (u); - if ((options & READ_UTMP_USER_PROCESS) && !up) + bool user_proc = IS_USER_PROCESS (u); + if ((options & READ_UTMP_USER_PROCESS) && !user_proc) return false; if ((options & READ_UTMP_CHECK_PIDS) - && up + && user_proc && (UT_PID (u) <= 0 || (kill (UT_PID (u), 0) < 0 && errno == ESRCH))) return false; -- 2.11.0