[LTP] [PATCH 3/6] Remove unnecessary header includes

Avinesh Kumar akumar@suse.de
Fri Jun 17 19:20:22 CEST 2022


Signed-off-by: Avinesh Kumar <akumar@suse.de>
---
 testcases/kernel/syscalls/utime/utime03.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/testcases/kernel/syscalls/utime/utime03.c b/testcases/kernel/syscalls/utime/utime03.c
index 2358fd70b..0c64518d2 100644
--- a/testcases/kernel/syscalls/utime/utime03.c
+++ b/testcases/kernel/syscalls/utime/utime03.c
@@ -18,11 +18,8 @@
  * - The user ID of the process has write access to the file.
  */
 
-#include <sys/types.h>
 #include <pwd.h>
 #include <utime.h>
-#include <sys/stat.h>
-#include <time.h>
 
 #include "tst_test.h"
 #include "tst_uid.h"
@@ -60,7 +57,7 @@ static void run(void)
 	struct stat statbuf;
 	time_t mintime, maxtime;
 
-	utbuf.modtime = time(0) - 5;
+	utbuf.modtime = tst_get_fs_timestamp() - 5;
 	utbuf.actime = utbuf.modtime + 1;
 	TST_EXP_PASS_SILENT(utime(TEMP_FILE, &utbuf));
 	SAFE_STAT(TEMP_FILE, &statbuf);
-- 
2.36.1



More information about the ltp mailing list