[Pkg-shadow-commits] r2026 - in upstream/trunk: . libmisc
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Sun May 25 22:11:13 UTC 2008
Author: nekral-guest
Date: 2008-05-25 22:11:12 +0000 (Sun, 25 May 2008)
New Revision: 2026
Modified:
upstream/trunk/ChangeLog
upstream/trunk/libmisc/utmp.c
Log:
* libmisc/utmp.c (checkutmp): Change picky argument's type to
bool.
* libmisc/utmp.c: Use bool when possible (found_utmpx,
found_utmp).
* libmisc/utmp.c: Add note about unchecked return values.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-05-25 22:03:09 UTC (rev 2025)
+++ upstream/trunk/ChangeLog 2008-05-25 22:11:12 UTC (rev 2026)
@@ -1,5 +1,13 @@
2008-05-25 Nicolas François <nicolas.francois at centraliens.net>
+ * libmisc/utmp.c (checkutmp): Change picky argument's type to
+ bool.
+ * libmisc/utmp.c: Use bool when possible (found_utmpx,
+ found_utmp).
+ * libmisc/utmp.c: Add note about unchecked return values.
+
+2008-05-25 Nicolas François <nicolas.francois at centraliens.net>
+
* libmisc/addgrps.c: Change type of added to bool.
* libmisc/addgrps.c: Avoid implicit conversion of pointers to
booleans.
Modified: upstream/trunk/libmisc/utmp.c
===================================================================
--- upstream/trunk/libmisc/utmp.c 2008-05-25 22:03:09 UTC (rev 2025)
+++ upstream/trunk/libmisc/utmp.c 2008-05-25 22:11:12 UTC (rev 2026)
@@ -115,7 +115,7 @@
#elif defined(LOGIN_PROCESS)
-void checkutmp (int picky)
+void checkutmp (bool picky)
{
char *line;
struct utmp *ut;
@@ -281,7 +281,7 @@
struct utmp *utmp, utline;
struct utmpx *utmpx, utxline;
pid_t pid = getpid ();
- int found_utmpx = 0, found_utmp = 0;
+ bool found_utmpx = false, found_utmp = false;
/*
* The canonical device name doesn't include "/dev/"; skip it
@@ -301,13 +301,13 @@
while (utmpx = getutxent ()) {
if (utmpx->ut_pid == pid) {
- found_utmpx = 1;
+ found_utmpx = true;
break;
}
}
while (utmp = getutent ()) {
if (utmp->ut_pid == pid) {
- found_utmp = 1;
+ found_utmp = true;
break;
}
}
@@ -369,6 +369,7 @@
pututxline (&utxline);
pututline (&utline);
+ /* TODO: log failures */
updwtmpx (_WTMP_FILE "x", &utxline);
updwtmp (_WTMP_FILE, &utline);
More information about the Pkg-shadow-commits
mailing list