From: Paul Eggert Date: Sat, 4 Jan 2025 18:48:13 +0000 (-0800) Subject: mktime: prefer bool to int X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=902f1ee6b75725358e44e51cb4813da09a606c0b;p=gnulib.git mktime: prefer bool to int * lib/mktime.c (__mktime_internal): Use bool for a boolean local. --- diff --git a/ChangeLog b/ChangeLog index 06819500ab..335a97d8cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025-01-04 Paul Eggert + + mktime: prefer bool to int + * lib/mktime.c (__mktime_internal): Use bool for a boolean local. + 2025-01-04 Bruno Haible mbs_endswith: Fix abort in the case of incomplete characters. diff --git a/lib/mktime.c b/lib/mktime.c index 74403e4530..75b5ef7eec 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -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;