]> Savannah Git Hosting - gnulib.git/commitdiff
mktime: prefer bool to int
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 4 Jan 2025 18:48:13 +0000 (10:48 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 5 Jan 2025 02:34:54 +0000 (18:34 -0800)
* lib/mktime.c (__mktime_internal): Use bool for a boolean local.

ChangeLog
lib/mktime.c

index 06819500abc6e6fd544f76cc125f45c153f3e890..335a97d8cb42fb2df3c6d020c2ece83b3f9ad605 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-01-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       mktime: prefer bool to int
+       * lib/mktime.c (__mktime_internal): Use bool for a boolean local.
+
 2025-01-04  Bruno Haible  <bruno@clisp.org>
 
        mbs_endswith: Fix abort in the case of incomplete characters.
index 74403e4530e5deb7413eaa5b1aa165d8e6166e64..75b5ef7eec13ea25d47a10c71d339ebd681f9276 100644 (file)
@@ -353,8 +353,8 @@ __mktime_internal (struct tm *tp, bool local, mktime_offset_t *offset)
   /* Ignore any tm_isdst request for timegm.  */
   int isdst = local ? tp->tm_isdst : 0;
 
-  /* 1 if the previous probe was DST.  */
-  int dst2 = 0;
+  /* True if the previous probe was DST.  */
+  bool dst2 = false;
 
   /* Ensure that mon is in range, and set year accordingly.  */
   int mon_remainder = mon % 12;