[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10158: Make buffer unit tests pass again (in tor/trunk: . src/or)



Author: nickm
Date: 2007-05-10 11:25:40 -0400 (Thu, 10 May 2007)
New Revision: 10158

Modified:
   tor/trunk/
   tor/trunk/src/or/buffers.c
Log:
 r12935@Kushana:  nickm | 2007-05-10 11:25:09 -0400
 Make buffer unit tests pass again



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r12935] on c95137ef-5f19-0410-b913-86e773d04f59

Modified: tor/trunk/src/or/buffers.c
===================================================================
--- tor/trunk/src/or/buffers.c	2007-05-10 10:01:53 UTC (rev 10157)
+++ tor/trunk/src/or/buffers.c	2007-05-10 15:25:40 UTC (rev 10158)
@@ -323,7 +323,7 @@
     }
   }
 
-  if (new_capacity < MIN_LAZY_SHRINK_SIZE)
+  if (buf->len == 0 && new_capacity < MIN_LAZY_SHRINK_SIZE)
     new_capacity = MIN_LAZY_SHRINK_SIZE;
 
   if (buf->len == 0 && IS_FREELIST_SIZE(new_capacity)) {