diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-08-21 15:09:48 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-08-21 15:09:48 -0500 |
commit | 8956e90c630951134b4ce53417bbc9af0f25f353 (patch) | |
tree | 4a8c706a63b5422b43bc67b9d64d93f279ee580a /src | |
parent | Merge pull request #5722 (diff) | |
parent | CryptonightR_JIT: fix return value on error (diff) | |
download | monero-8956e90c630951134b4ce53417bbc9af0f25f353.tar.xz |
Merge pull request #5731
c393e82 CryptonightR_JIT: fix return value on error (selene-kovri)
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/CryptonightR_JIT.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crypto/CryptonightR_JIT.c b/src/crypto/CryptonightR_JIT.c index ee8f3f36f..ffe7820a2 100644 --- a/src/crypto/CryptonightR_JIT.c +++ b/src/crypto/CryptonightR_JIT.c @@ -63,7 +63,7 @@ int v4_generate_JIT_code(const struct V4_Instruction* code, v4_random_math_JIT_f #if !(defined(_MSC_VER) || defined(__MINGW32__)) if (mprotect((void*)buf, buf_size, PROT_READ | PROT_WRITE)) - return 1; + return -1; #endif APPEND_CODE(prologue, sizeof(prologue)); @@ -111,13 +111,13 @@ int v4_generate_JIT_code(const struct V4_Instruction* code, v4_random_math_JIT_f #if !(defined(_MSC_VER) || defined(__MINGW32__)) if (mprotect((void*)buf, buf_size, PROT_READ | PROT_EXEC)) - return 1; + return -1; #endif __builtin___clear_cache((char*)buf, (char*)JIT_code); return 0; #else - return 1; + return -1; #endif } |