summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiami <1927254+Xiami2012@users.noreply.github.com>2022-10-05 18:11:28 +0800
committerIker Pedrosa <ikerpedrosam@gmail.com>2022-10-05 12:43:45 +0200
commite503fd574b7dbf6b21b1168e20938f0922807916 (patch)
treec783368207b6001f3bb19dd2525a7caca1dc322e
parent3dc1754e50ee559ea810f6c4b406c7a117cb8131 (diff)
chage: Fix regression in print_date
Introduced by c6c8130db4319613a91dd07bbb845f6c33c5f79f After removing snprintf, the format string should get unescaped once. Fixes #564 Reporter and patch author: DerMouse (github.com/DerMouse)
-rw-r--r--src/chage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chage.c b/src/chage.c
index 8cf67794..01570d72 100644
--- a/src/chage.c
+++ b/src/chage.c
@@ -228,7 +228,7 @@ static void print_date (time_t date)
if (NULL == tp) {
(void) printf ("time_t: %lu\n", (unsigned long)date);
} else {
- (void) strftime (buf, sizeof buf, iflg ? "%%Y-%%m-%%d" : "%%b %%d, %%Y", tp);
+ (void) strftime (buf, sizeof buf, iflg ? "%Y-%m-%d" : "%b %d, %Y", tp);
(void) puts (buf);
}
}