striker 01/07/01 05:42:21
Modified: memory/unix apr_sms_trivial.c
Log:
Increased the size of the count field. Although it is very unlikely we
ever give out more than 0x10000 fragments from one single block, it seems
better to rule it out.
Replaced a typecast with a macro.
Revision Changes Path
1.2 +2 -2 apr/memory/unix/apr_sms_trivial.c
Index: apr_sms_trivial.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_sms_trivial.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_sms_trivial.c 2001/07/01 06:23:09 1.1
+++ apr_sms_trivial.c 2001/07/01 12:42:21 1.2
@@ -79,7 +79,7 @@
struct node_t *prev;
char *first_avail;
apr_size_t avail_size;
- apr_uint16_t count;
+ apr_uint32_t count;
} node_t;
typedef struct apr_sms_trivial_t
@@ -417,7 +417,7 @@
new_sms->destroy_fn = apr_sms_trivial_destroy;
new_sms->identity = module_identity;
- node = (node_t *)((char *)new_sms + SIZEOF_TRIVIAL_T);
+ node = NODE_T((char *)new_sms + SIZEOF_TRIVIAL_T);
node->first_avail = (char *)node + SIZEOF_NODE_T;
node->avail_size = min_alloc - SIZEOF_TRIVIAL_T - SIZEOF_NODE_T;
node->count = 0;