OSSP CVS Repository

ossp - Check-in [4199]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4199
Date: 2001-Jul-16 20:26:58 (local)
2001-Jul-16 18:26:58 (UTC)
User:simons
Branch:
Comment: It's not necessary to enlarge size until it is larger than new_capacity; equalling new_capacity is fine.
Tickets:
Inspections:
Files:
ossp-pkg/xds/set-capacity.c      1.2 -> 1.3     1 inserted, 1 deleted

ossp-pkg/xds/set-capacity.c 1.2 -> 1.3

--- set-capacity.c       2001/07/09 17:22:34     1.2
+++ set-capacity.c       2001/07/16 18:26:58     1.3
@@ -48,7 +48,7 @@
 
     /* Find the correct capacity. */
 
-    for(size = (*array_capacity != 0) ? *array_capacity * 2 : initial_capacity; size <= new_capacity; size *= 2)
+    for(size = (*array_capacity != 0) ? *array_capacity * 2 : initial_capacity; size < new_capacity; size *= 2)
         ;
 
     /* Allocate the array and store the new values. */

CVSTrac 2.0.1