]> Savannah Git Hosting - gnulib.git/commitdiff
strptime: fix typo in previous patch
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Dec 2019 18:31:42 +0000 (10:31 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 24 Dec 2019 18:32:05 +0000 (10:32 -0800)
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
lib/strptime.c

index 35ce1e7e7677d28948c6a2b4d0d76df439428f11..1f542832ebca2e390defa85ff056d99fe71f1e93 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-12-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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  <bruno@clisp.org>
 
        setlocale-null: Make it easy to rely on the lock in another library.
index 9c2c2e38b1aeba98e4b7d0b9dc14b4bf4bef74c7..503fc193279b25cf645fc8f1adf8b640c204ad03 100644 (file)
@@ -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);