[Pkg-shadow-commits] r2164 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Fri Jun 13 21:28:12 UTC 2008
Author: nekral-guest
Date: 2008-06-13 21:28:11 +0000 (Fri, 13 Jun 2008)
New Revision: 2164
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/faillog.c
Log:
* src/faillog.c: Ignore return value of time() when use with a
non NULL argument.
* src/faillog.c: Use a %lu format and cast number of days to
unsigned long integers.
* src/faillog.c: Cast dates to time_t.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-06-13 21:25:15 UTC (rev 2163)
+++ upstream/trunk/ChangeLog 2008-06-13 21:28:11 UTC (rev 2164)
@@ -1,5 +1,13 @@
2008-06-13 Nicolas François <nicolas.francois at centraliens.net>
+ * src/faillog.c: Ignore return value of time() when use with a
+ non NULL argument.
+ * src/faillog.c: Use a %lu format and cast number of days to
+ unsigned long integers.
+ * src/faillog.c: Cast dates to time_t.
+
+2008-06-13 Nicolas François <nicolas.francois at centraliens.net>
+
* src/login.c: Ignore the return value of signal().
* src/login.c: Use a %lu format and cast group and user IDs to
unsigned long integers.
Modified: upstream/trunk/src/faillog.c
===================================================================
--- upstream/trunk/src/faillog.c 2008-06-13 21:25:15 UTC (rev 2163)
+++ upstream/trunk/src/faillog.c 2008-06-13 21:28:11 UTC (rev 2164)
@@ -96,7 +96,7 @@
once = true;
}
pwent = getpwuid (uid); /* local, no need for xgetpwuid */
- time (&now);
+ (void) time (&now);
tm = localtime (&fl->fail_time);
#ifdef HAVE_STRFTIME
strftime (ptime, sizeof (ptime), "%D %H:%M:%S %z", tm);
@@ -111,12 +111,11 @@
if (0 != fl->fail_locktime) {
if ( ((fl->fail_time+fl->fail_locktime) > now)
&& (0 != fl->fail_cnt)) {
- printf (_(" [%lds left]"),
- fl->fail_time +
- fl->fail_locktime - now);
+ printf (_(" [%lus left]"),
+ (unsigned long) fl->fail_time + fl->fail_locktime - now);
} else {
printf (_(" [%lds lock]"),
- fl->fail_locktime);
+ fl->fail_locktime);
}
}
}
@@ -373,7 +372,7 @@
break;
case 't':
days = atoi (optarg);
- seconds = days * DAY;
+ seconds = (time_t) days * DAY;
tflg = true;
break;
case 'u':
More information about the Pkg-shadow-commits
mailing list