summaryrefslogtreecommitdiff
path: root/libs/hwui/service/GraphicsStatsService.cpp
diff options
context:
space:
mode:
authorzhangkuili <zhangkuili@xiaomi.com>2018-06-21 14:53:15 -0700
committerandroid-build-merger <android-build-merger@google.com>2018-06-21 14:53:15 -0700
commit399ac24bdfe0c06e04ff239bb77c57c6170ee074 (patch)
treeee9cde9f8fc5ca6588c7e20374279a905d12a823 /libs/hwui/service/GraphicsStatsService.cpp
parent946957bc324c1edc9b5a85f260d3eaa70b4fe8fb (diff)
parentb352dcd153445e32c74701b89ec1d26e73a97e47 (diff)
Merge "[Stability][hwui] check mmap return value"
am: b352dcd153 Change-Id: I8d04c5433ca881e62a23e0aa13e022cdf8d16d9a
Diffstat (limited to 'libs/hwui/service/GraphicsStatsService.cpp')
-rw-r--r--libs/hwui/service/GraphicsStatsService.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/service/GraphicsStatsService.cpp b/libs/hwui/service/GraphicsStatsService.cpp
index 7f8cb2d1f577..3d50d2d7e59c 100644
--- a/libs/hwui/service/GraphicsStatsService.cpp
+++ b/libs/hwui/service/GraphicsStatsService.cpp
@@ -127,7 +127,7 @@ bool GraphicsStatsService::parseFromFile(const std::string& path,
return false;
}
void* addr = mmap(nullptr, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
- if (!addr) {
+ if (addr == MAP_FAILED) {
int err = errno;
// The file not existing is normal for addToDump(), so only log if
// we get an unexpected error