diff options
author | Anton Blanchard <anton@samba.org> | 2010-08-16 23:06:55 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-08-16 23:06:55 -0700 |
commit | b9b42ee01c935133c025d3b20102c1e490354e8e (patch) | |
tree | 939013de87dc7f89fcddd55e928b5e9fb2a19a3d /malloc/malloc.c | |
parent | 004c737f7b097026c4231fbc3644e9450f9e087e (diff) | |
download | glibc-b9b42ee01c935133c025d3b20102c1e490354e8e.tar glibc-b9b42ee01c935133c025d3b20102c1e490354e8e.tar.gz glibc-b9b42ee01c935133c025d3b20102c1e490354e8e.tar.bz2 glibc-b9b42ee01c935133c025d3b20102c1e490354e8e.zip |
Replace divide and multiply with mask in sYSTRIm
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r-- | malloc/malloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index 9594be4cbd..53ee1ccb87 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -3466,7 +3466,7 @@ static int sYSTRIm(pad, av) size_t pad; mstate av; top_size = chunksize(av->top); /* Release in pagesize units, keeping at least one page */ - extra = ((top_size - pad - MINSIZE + (pagesz-1)) / pagesz - 1) * pagesz; + extra = (top_size - pad - MINSIZE - 1) & ~(pagesz - 1); if (extra > 0) { |