From 2a28e881a6045e929fb890da86e115fc1de606b6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 24 Dec 2019 10:31:42 -0800 Subject: [PATCH] strptime: fix typo in previous patch Problem and fix reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2019-12/msg00202.html * lib/strptime.c (day_of_the_week): Fix paren bug. --- ChangeLog | 7 +++++++ lib/strptime.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 35ce1e7e76..1f542832eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2019-12-24 Paul Eggert + + strptime: fix typo in previous patch + Problem and fix reported by Bruno Haible in: + https://lists.gnu.org/r/bug-gnulib/2019-12/msg00202.html + * lib/strptime.c (day_of_the_week): Fix paren bug. + 2019-12-24 Bruno Haible setlocale-null: Make it easy to rely on the lock in another library. diff --git a/lib/strptime.c b/lib/strptime.c index 9c2c2e38b1..503fc19327 100644 --- a/lib/strptime.c +++ b/lib/strptime.c @@ -206,7 +206,7 @@ day_of_the_week (struct tm *tm) int wday = (-473 + (365 * (tm->tm_year - 70)) + corr_quad - - (corr_quad + (corr_quad < 0)) / 25 - (corr_quad < 0) + - ((corr_quad + (corr_quad < 0)) / 25 - (corr_quad < 0)) + ((corr_quad / 25) / 4) + __mon_yday[0][tm->tm_mon] + tm->tm_mday - 1); -- 2.39.5