Remove HAVE_STRFTIME ifdefs

strftime(3) has been in standard C since C89.  It is also in
POSIX.1-2001, and in SVr4 (see strftime(3) and strftime(3p)).
We can assume that this function is always available.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar
2021-12-27 20:50:06 +01:00
parent 92bd73c657
commit 3e602b58a2
6 changed files with 2 additions and 61 deletions
+1 -6
View File
@@ -111,11 +111,8 @@ static void print_one (/*@null@*/const struct passwd *pw, bool force)
off_t offset;
struct faillog fl;
time_t now;
#ifdef HAVE_STRFTIME
char *cp;
char ptime[80];
#endif
if (NULL == pw) {
return;
@@ -168,13 +165,11 @@ static void print_one (/*@null@*/const struct passwd *pw, bool force)
fprintf (stderr, "Cannot read time from faillog.\n");
return;
}
#ifdef HAVE_STRFTIME
strftime (ptime, sizeof (ptime), "%D %H:%M:%S %z", tm);
cp = ptime;
#endif
printf ("%-9s %5d %5d ",
pw->pw_name, fl.fail_cnt, fl.fail_max);
/* FIXME: cp is not defined ifndef HAVE_STRFTIME */
printf ("%s %s", cp, fl.fail_line);
if (0 != fl.fail_locktime) {
if ( ((fl.fail_time + fl.fail_locktime) > now)