diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-03-06 12:08:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-04-04 12:56:52 -0400 |
commit | 027c536598f336014d7ef406610207ec4559d490 (patch) | |
tree | b683bcd7728c2e6b1332c1f6dc690f5829f20e7f /src/lib/malloc/map_anon.c | |
parent | 785c3f84de958e90c45e82d6126a8c66958be4e1 (diff) | |
download | tor-027c536598f336014d7ef406610207ec4559d490.tar.gz tor-027c536598f336014d7ef406610207ec4559d490.zip |
rename inherit values to avoid conflict with system defines
Diffstat (limited to 'src/lib/malloc/map_anon.c')
-rw-r--r-- | src/lib/malloc/map_anon.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/malloc/map_anon.c b/src/lib/malloc/map_anon.c index bb0a3d5741..3e1c22648d 100644 --- a/src/lib/malloc/map_anon.c +++ b/src/lib/malloc/map_anon.c @@ -123,14 +123,14 @@ noinherit_mem(void *mem, size_t sz, unsigned *inherit_result_out) #ifdef FLAG_ZERO int r = MINHERIT(mem, sz, FLAG_ZERO); if (r == 0) { - *inherit_result_out = INHERIT_ZERO; + *inherit_result_out = INHERIT_RES_ZERO; return 0; } #endif #ifdef FLAG_NOINHERIT int r2 = MINHERIT(mem, sz, FLAG_NOINHERIT); if (r2 == 0) { - *inherit_result_out = INHERIT_DROP; + *inherit_result_out = INHERIT_RES_DROP; } return r2; #else @@ -154,9 +154,9 @@ noinherit_mem(void *mem, size_t sz, unsigned *inherit_result_out) * Memory returned from this function must be released with * tor_munmap_anonymous(). * - * If <b>inherit_result_out</b> is non-NULL, set it to one of INHERIT_KEEP, - * INHERIT_DROP, and INHERIT_ZERO, depending on the properties of the returned - * memory. + * If <b>inherit_result_out</b> is non-NULL, set it to one of + * INHERIT_RES_KEEP, INHERIT_RES_DROP, or INHERIT_RES_ZERO, depending on the + * properties of the returned memory. * * [Note: OS people use the word "anonymous" here to mean that the memory * isn't associated with any file. This has *nothing* to do with the kind of @@ -170,7 +170,7 @@ tor_mmap_anonymous(size_t sz, unsigned flags, unsigned *inherit_result_out) if (inherit_result_out == NULL) { inherit_result_out = &itmp; } - *inherit_result_out = INHERIT_KEEP; + *inherit_result_out = INHERIT_RES_KEEP; #if defined(_WIN32) HANDLE mapping = CreateFileMapping(INVALID_HANDLE_VALUE, |