Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r--winsup/cygwin/cygheap.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index 37350b1dd..9d1eeeb7e 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -167,10 +167,11 @@ static void *__stdcall
_cmalloc (int size)
{
_cmalloc_entry *rvc;
- int b, sz;
+ unsigned b, sz;
/* Calculate "bit bucket" and size as a power of two. */
- for (b = 3, sz = 8; sz && sz < (size + 4); b++, sz <<= 1)
+ for (b = 3, sz = 8; sz && sz < (size + sizeof (_cmalloc_entry));
+ b++, sz <<= 1)
continue;
cygheap_protect->acquire ();