bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read_utmp changes


From: Jim Meyering
Subject: Re: read_utmp changes
Date: Wed, 18 Oct 2006 19:52:11 +0200

"Sergey Poznyakoff" <address@hidden> wrote:
> I have installed the following change to read_utmp:
>
> 2006-10-18  Sergey Poznyakoff  <address@hidden>
>
>         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
>         READ_UTMP_USER_PROCESS.
>         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag

Hi Sergey,

That change looks fine.  Next time I'll try to reply sooner.
I've made this additional change:

2006-10-18  Jim Meyering  <address@hidden>

        * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
        type for a local, and rename it: s/up/user_proc/.

Index: lib/readutmp.c
===================================================================
RCS file: /sources/gnulib/gnulib/lib/readutmp.c,v
retrieving revision 1.26
diff -u -r1.26 readutmp.c
--- lib/readutmp.c      18 Oct 2006 13:24:19 -0000      1.26
+++ lib/readutmp.c      18 Oct 2006 17:49:14 -0000
@@ -69,11 +69,11 @@
 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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]