X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Freadutmp.c;h=ef6277a680ab82952e1d83dea4d9451504ce6295;hb=6925387eae842273dbb242d3933046bb13e50bc2;hp=38453eb447e105a3583f237154aab0c8fdae49d3;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=gnulib.git diff --git a/lib/readutmp.c b/lib/readutmp.c index 38453eb44..ef6277a68 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-2011 Free Software Foundation, Inc. + Copyright (C) 1992-2001, 2003-2006, 2009-2012 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 @@ -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; }