From: Paul Eggert Date: Tue, 24 Dec 2019 18:31:42 +0000 (-0800) Subject: strptime: fix typo in previous patch X-Git-Tag: v1.0~4425 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2a28e881a6045e929fb890da86e115fc1de606b6;p=gnulib.git 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. --- 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);