Update README.md

Fix bug in error checking for mmap
This commit is contained in:
Carlo Marcelo Arenas Belón 2019-08-02 16:18:23 -07:00 committed by GitHub
parent b0f3d11128
commit 3743f6f013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -398,7 +398,7 @@ fn compile_identity(void) {
MAP_PRIVATE | MAP_ANONYMOUS,
-1, // fd (not used here)
0); // offset (not used here)
if (!memory) {
if (memory == MAP_FAILED) {
perror("failed to allocate memory");
exit(1);
}