diff options
author | Hurri Lu <jlu32@marvell.com> | 2014-05-22 11:38:12 +0800 |
---|---|---|
committer | Hurri Lu <jlu32@marvell.com> | 2014-05-22 12:51:39 +0800 |
commit | 473a729937476d5e18b5e10b7b2eff119202fd46 (patch) | |
tree | 8c6ed4dfa8a229510ae6ab4145805a7a66c78bfa /libpixelflinger/codeflinger/CodeCache.cpp | |
parent | 08c08f72617b13696049bf295646d6a68f3f1a8c (diff) | |
download | system_core-473a729937476d5e18b5e10b7b2eff119202fd46.zip system_core-473a729937476d5e18b5e10b7b2eff119202fd46.tar.gz system_core-473a729937476d5e18b5e10b7b2eff119202fd46.tar.bz2 |
Judge mmap failed by MAP_FAILED instead of NULL
Change-Id: I74422cfdba341fcd1a6235044700cf3986e853d0
Signed-off-by: Hurri Lu <jlu32@marvell.com>
Diffstat (limited to 'libpixelflinger/codeflinger/CodeCache.cpp')
-rw-r--r-- | libpixelflinger/codeflinger/CodeCache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpixelflinger/codeflinger/CodeCache.cpp b/libpixelflinger/codeflinger/CodeCache.cpp index 7446da2..8afe0a9 100644 --- a/libpixelflinger/codeflinger/CodeCache.cpp +++ b/libpixelflinger/codeflinger/CodeCache.cpp @@ -89,7 +89,7 @@ static mspace getMspace() gExecutableStore = mmap(NULL, kMaxCodeCacheCapacity, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0); - LOG_ALWAYS_FATAL_IF(gExecutableStore == NULL, + LOG_ALWAYS_FATAL_IF(gExecutableStore == MAP_FAILED, "Creating code cache, mmap failed with error " "'%s'", strerror(errno)); close(fd); |