summaryrefslogtreecommitdiff
path: root/src/ralloc.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-06-23 12:46:33 +0300
committerEli Zaretskii <eliz@gnu.org>2012-06-23 12:46:33 +0300
commite8a022046f57aa23f605593e0ccd901da1776c5e (patch)
treeb10cf0ebc81b162b39c302e444905c78b0092ad6 /src/ralloc.c
parent0e9e6c6abce029feda6cced84cb1fa2dc1d6d1c1 (diff)
downloademacs-e8a022046f57aa23f605593e0ccd901da1776c5e.tar.gz
Really fix bug #11519, by fixing the last change in ralloc.c.
src/ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko in the logic of incrementing and decrementing the value of use_relocatable_buffers.
Diffstat (limited to 'src/ralloc.c')
-rw-r--r--src/ralloc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ralloc.c b/src/ralloc.c
index 19d15664eec..0d8bcaf4ffb 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -741,7 +741,7 @@ r_alloc_sbrk (long int size)
if (! r_alloc_initialized)
r_alloc_init ();
- if (! use_relocatable_buffers)
+ if (use_relocatable_buffers <= 0)
return (*real_morecore) (size);
if (size == 0)
@@ -1142,12 +1142,12 @@ r_alloc_reset_variable (POINTER *old, POINTER *new)
void
r_alloc_inhibit_buffer_relocation (int inhibit)
{
- if (use_relocatable_buffers < 0)
- use_relocatable_buffers = 0;
+ if (use_relocatable_buffers > 1)
+ use_relocatable_buffers = 1;
if (inhibit)
- use_relocatable_buffers++;
- else if (use_relocatable_buffers > 0)
use_relocatable_buffers--;
+ else if (use_relocatable_buffers < 1)
+ use_relocatable_buffers++;
}