[56/59] mktime: prefer bool to int

Message ID 20250105055750.1668721-57-eggert@cs.ucla.edu (mailing list archive)
State New
Headers
Series time: sync mktime from Gnulib |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Paul Eggert Jan. 5, 2025, 5:57 a.m. UTC
  * lib/mktime.c (__mktime_internal): Use bool for a boolean local.
---
 time/mktime.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/time/mktime.c b/time/mktime.c
index 0981cd1d1d..fca0b62d76 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -359,8 +359,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;