]> code.delx.au - gnu-emacs/commitdiff
Backport: Really fix bug #11519, by fixing the last change in ralloc.c.
authorEli Zaretskii <eliz@gnu.org>
Sat, 23 Jun 2012 11:07:01 +0000 (14:07 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 23 Jun 2012 11:07:01 +0000 (14:07 +0300)
 src/ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
 in the logic of incrementing and decrementing the value of
 use_relocatable_buffers.

src/ChangeLog
src/ralloc.c

index 2173778c29cfe092e9e24b4727169eed00f7e4f7..68bb4a030fb9846d78d7f52958445c450b618cc4 100644 (file)
@@ -1,3 +1,9 @@
+2012-06-23  Eli Zaretskii  <eliz@gnu.org>
+
+       * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
+       in the logic of incrementing and decrementing the value of
+       use_relocatable_buffers.
+
 2012-06-21  Glenn Morris  <rgm@gnu.org>
 
        * charset.c (init_charset): Make lack of etc/charsets fatal.
index 2e4823dc6c17f9fcf8114ce1592ac7ff8e23f6c1..b1a5982574f0e008ec09c7d4dbc914df0a334366 100644 (file)
@@ -757,7 +757,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)
@@ -1204,12 +1204,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++;
 }
 
 \f