OSSP CVS Repository

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

Check-in Number: 4167
Date: 2001-Jul-08 17:28:51 (local)
2001-Jul-08 15:28:51 (UTC)
User:simons
Branch:
Comment: Added define for the initial size of the engines array to internal.h and use it in xds_register().
Tickets:
Inspections:
Files:
ossp-pkg/xds/internal.h      1.3 -> 1.4     2 inserted, 0 deleted
ossp-pkg/xds/register.c      1.3 -> 1.4     5 inserted, 2 deleted

ossp-pkg/xds/internal.h 1.3 -> 1.4

--- internal.h   2001/07/08 15:20:34     1.3
+++ internal.h   2001/07/08 15:28:51     1.4
@@ -32,6 +32,8 @@
 
 #include "xds.h"
 
+#define XDS_INITIAL_ENGINES_CAPACITY 32
+
 typedef struct
     {
     char*        name;


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

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

CVSTrac 2.0.1