summaryrefslogtreecommitdiffstats
path: root/gl/mktime.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/mktime.c')
-rw-r--r--gl/mktime.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gl/mktime.c b/gl/mktime.c
index 4218fca6..c56c6f9a 100644
--- a/gl/mktime.c
+++ b/gl/mktime.c
@@ -1,5 +1,5 @@
1/* Convert a 'struct tm' to a time_t value. 1/* Convert a 'struct tm' to a time_t value.
2 Copyright (C) 1993-2025 Free Software Foundation, Inc. 2 Copyright (C) 1993-2026 Free Software Foundation, Inc.
3 This file is part of the GNU C Library. 3 This file is part of the GNU C Library.
4 Contributed by Paul Eggert <eggert@twinsun.com>. 4 Contributed by Paul Eggert <eggert@twinsun.com>.
5 5
@@ -468,11 +468,9 @@ __mktime_internal (struct tm *tp, bool local, mktime_offset_t *offset)
468 int year_seconds_bound = 366 * 24 * 60 * 60 + 1; 468 int year_seconds_bound = 366 * 24 * 60 * 60 + 1;
469 int delta_bound = year_seconds_bound + stride; 469 int delta_bound = year_seconds_bound + stride;
470 470
471 int delta, direction;
472
473 /* Search in both directions, closest first. */ 471 /* Search in both directions, closest first. */
474 for (delta = stride; delta < delta_bound; delta += stride) 472 for (int delta = stride; delta < delta_bound; delta += stride)
475 for (direction = -1; direction <= 1; direction += 2) 473 for (int direction = -1; direction <= 1; direction += 2)
476 { 474 {
477 long_int ot; 475 long_int ot;
478 if (! ckd_add (&ot, t, delta * direction)) 476 if (! ckd_add (&ot, t, delta * direction))