OSSP CVS Repository

ossp - Difference in ossp-pkg/xds/register.c versions 1.2 and 1.3
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

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