Skip to content

Commit

Permalink
syscalls/msync01: Remove useless getpagesize() check
Browse files Browse the repository at this point in the history
Unlike sysconf() the getpagesize() call cannot fail.

This fixes compiler warning integer expressions of different signedness.

Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Jan 25, 2021
1 parent 3093273 commit 60f4b01
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions testcases/kernel/syscalls/msync/msync01.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions testcases/kernel/syscalls/msync/msync02.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 60f4b01

Please sign in to comment.