From 60f4b01194cafd2d1ca1102ee899a5f860e961af Mon Sep 17 00:00:00 2001 From: Petr Vorel Date: Mon, 25 Jan 2021 11:57:33 +0100 Subject: [PATCH] syscalls/msync01: Remove useless getpagesize() check Unlike sysconf() the getpagesize() call cannot fail. This fixes compiler warning integer expressions of different signedness. Signed-off-by: Petr Vorel --- testcases/kernel/syscalls/msync/msync01.c | 3 --- testcases/kernel/syscalls/msync/msync02.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/testcases/kernel/syscalls/msync/msync01.c b/testcases/kernel/syscalls/msync/msync01.c index 565d5fe7c..121fd86e8 100644 --- a/testcases/kernel/syscalls/msync/msync01.c +++ b/testcases/kernel/syscalls/msync/msync01.c @@ -159,9 +159,6 @@ void setup(void) TEST_PAUSE; - if ((page_sz = getpagesize()) == -1) - tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed"); - tst_tmpdir(); if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0) diff --git a/testcases/kernel/syscalls/msync/msync02.c b/testcases/kernel/syscalls/msync/msync02.c index 73a6123be..c7b7e9e9c 100644 --- a/testcases/kernel/syscalls/msync/msync02.c +++ b/testcases/kernel/syscalls/msync/msync02.c @@ -113,9 +113,6 @@ void setup(void) TEST_PAUSE; - if ((page_sz = getpagesize()) == -1) - tst_brkm(TBROK | TERRNO, NULL, "getpagesize failed"); - tst_tmpdir(); if ((fildes = open(TEMPFILE, O_RDWR | O_CREAT, 0666)) < 0)