OSSP CVS Repository

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

Check-in Number: 4166
Date: 2001-Jul-08 17:26:22 (local)
2001-Jul-08 15:26:22 (UTC)
User:simons
Branch:
Comment: xds_register() now uses xds_set_capacity() to handle the dynamic buffer for storing the engines.
Tickets:
Inspections:
Files:
ossp-pkg/xds/register.c      1.2 -> 1.3     5 inserted, 1 deleted

ossp-pkg/xds/register.c 1.2 -> 1.3

--- register.c   2001/07/08 15:22:00     1.2
+++ register.c   2001/07/08 15:26:22     1.3
@@ -63,7 +63,11 @@
         }
     else
         {                       /* insert new entry */
-        xds_set_capacity((void**)&xds->engines, &xds->engines_capacity, xds->engines_len + 1, sizeof(engine_map_t), 1);
+        int rc = xds_set_capacity((void**)&xds->engines, &xds->engines_capacity,
+                                  xds->engines_len + 1, sizeof(engine_map_t), 32);
+        assert(rc == XDS_OK || rc == XDS_ERR_NO_MEM);
+        if (rc != XDS_OK)
+            return rc;
         memmove(&xds->engines[pos+1], &xds->engines[pos], (xds->engines_len - pos) * sizeof(engine_map_t));
         ++xds->engines_len;
         }

CVSTrac 2.0.1