Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04e28c74 authored by Vilas Bhat's avatar Vilas Bhat
Browse files

libbinder: Remove hardcoded PAGE_SIZE usage in binderLibTest

Bug: 325083392
Test: atest binderLibTest
Change-Id: I19530353ee3455573a824d42c146b6e4340f2358
parent a1283449
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -70,7 +70,7 @@ MATCHER_P(StatusEq, expected, (negation ? "not " : "") + statusToString(expected
}
}


static ::testing::AssertionResult IsPageAligned(void *buf) {
static ::testing::AssertionResult IsPageAligned(void *buf) {
    if (((unsigned long)buf & ((unsigned long)PAGE_SIZE - 1)) == 0)
    if (((unsigned long)buf & ((unsigned long)getpagesize() - 1)) == 0)
        return ::testing::AssertionSuccess();
        return ::testing::AssertionSuccess();
    else
    else
        return ::testing::AssertionFailure() << buf << " is not page aligned";
        return ::testing::AssertionFailure() << buf << " is not page aligned";