diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:29:05 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:29:05 +0100 |
| commit | 33a5320dda21ae791eee4763c64f1285ae04217d (patch) | |
| tree | 5c15bc695be820b393a8496c5807ecafbbdeb89b /tests/test-stat-time.c | |
| parent | b2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff) | |
| parent | ff33e1d252f46bec1a33e28700da3282fc24047a (diff) | |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'tests/test-stat-time.c')
| -rw-r--r-- | tests/test-stat-time.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/test-stat-time.c b/tests/test-stat-time.c index 19ecc838..7c6e5955 100644 --- a/tests/test-stat-time.c +++ b/tests/test-stat-time.c @@ -1,5 +1,5 @@ /* Test of <stat-time.h>. - Copyright (C) 2007-2025 Free Software Foundation, Inc. + Copyright (C) 2007-2026 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -107,8 +107,6 @@ do_stat (const char *filename, struct stat *p) static void prepare_test (struct stat *statinfo, struct timespec *modtimes) { - int i; - create_file (filename_stamp1); nap (); create_file (filename_testfile); @@ -125,7 +123,7 @@ prepare_test (struct stat *statinfo, struct timespec *modtimes) do_stat (filename_stamp3, &statinfo[3]); /* Now use our access functions. */ - for (i = 0; i < NFILES; ++i) + for (int i = 0; i < NFILES; ++i) { modtimes[i] = get_stat_mtime (&statinfo[i]); } @@ -134,8 +132,6 @@ prepare_test (struct stat *statinfo, struct timespec *modtimes) static void test_mtime (const struct stat *statinfo, struct timespec *modtimes) { - int i; - /* Use the struct stat fields directly. */ /* mtime(stamp1) < mtime(stamp2) */ ASSERT (statinfo[0].st_mtime < statinfo[2].st_mtime @@ -159,7 +155,7 @@ test_mtime (const struct stat *statinfo, struct timespec *modtimes) && modtimes[2].tv_nsec < modtimes[3].tv_nsec)); /* verify equivalence */ - for (i = 0; i < NFILES; ++i) + for (int i = 0; i < NFILES; ++i) { struct timespec ts; ts = get_stat_mtime (&statinfo[i]); @@ -195,10 +191,8 @@ test_birthtime (const struct stat *statinfo, const struct timespec *modtimes, struct timespec *birthtimes) { - int i; - /* Collect the birth times. */ - for (i = 0; i < NFILES; ++i) + for (int i = 0; i < NFILES; ++i) { birthtimes[i] = get_stat_birthtime (&statinfo[i]); if (birthtimes[i].tv_nsec < 0) |
