aboutsummaryrefslogtreecommitdiff
path: root/src/lib/memorypool.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/memorypool.c')
-rw-r--r--src/lib/memorypool.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/memorypool.c b/src/lib/memorypool.c
index bda45e1e..8ef1e2d1 100644
--- a/src/lib/memorypool.c
+++ b/src/lib/memorypool.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of libmicrohttpd 2 This file is part of libmicrohttpd
3 Copyright (C) 2007, 2009, 2010 Daniel Pittman and Christian Grothoff 3 Copyright (C) 2007, 2009, 2010, 2018 Christian Grothoff
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public 6 modify it under the terms of the GNU Lesser General Public
@@ -71,9 +71,9 @@ struct MemoryPool
71 size_t end; 71 size_t end;
72 72
73 /** 73 /**
74 * #MHD_NO if pool was malloc'ed, #MHD_YES if mmapped (VirtualAlloc'ed for W32). 74 * false if pool was malloc'ed, true if mmapped (VirtualAlloc'ed for W32).
75 */ 75 */
76 int is_mmap; 76 bool is_mmap;
77}; 77};
78 78
79 79
@@ -135,11 +135,11 @@ MHD_pool_create (size_t max)
135 free (pool); 135 free (pool);
136 return NULL; 136 return NULL;
137 } 137 }
138 pool->is_mmap = MHD_NO; 138 pool->is_mmap = false;
139 } 139 }
140 else 140 else
141 { 141 {
142 pool->is_mmap = MHD_YES; 142 pool->is_mmap = true;
143 } 143 }
144 pool->pos = 0; 144 pool->pos = 0;
145 pool->end = max; 145 pool->end = max;
@@ -158,7 +158,7 @@ MHD_pool_destroy (struct MemoryPool *pool)
158{ 158{
159 if (NULL == pool) 159 if (NULL == pool)
160 return; 160 return;
161 if (MHD_NO == pool->is_mmap) 161 if (! pool->is_mmap)
162 free (pool->memory); 162 free (pool->memory);
163 else 163 else
164#if defined(MAP_ANONYMOUS) && !defined(_WIN32) 164#if defined(MAP_ANONYMOUS) && !defined(_WIN32)