wrowe 2002/09/29 09:21:52
Modified: memory/unix apr_pools.c
Log:
Patch a compilation signedness emit... the difference of the memory ptrs
resulted in a ssize_t rather than the size_t we are comparing to. Change
to addition and all is well.
Revision Changes Path
1.185 +3 -3 apr/memory/unix/apr_pools.c
Index: apr_pools.c
===================================================================
RCS file: /home/cvs/apr/memory/unix/apr_pools.c,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -r1.184 -r1.185
--- apr_pools.c 12 Aug 2002 22:02:18 -0000 1.184
+++ apr_pools.c 29 Sep 2002 16:21:52 -0000 1.185
@@ -612,7 +612,7 @@
active = pool->active;
/* If the active node has enough bytes left, use it. */
- if (size < active->endp - active->first_avail) {
+ if (active->first_avail + size < active->endp) {
mem = active->first_avail;
active->first_avail += size;
@@ -620,7 +620,7 @@
}
node = active->next;
- if (size < node->endp - node->first_avail) {
+ if (node->first_avail + size < node->endp) {
*node->ref = node->next;
node->next->ref = node->ref;
}
@@ -925,7 +925,7 @@
size = APR_PSPRINTF_MIN_STRINGSIZE;
node = active->next;
- if (!ps->got_a_new_node && size < node->endp - node->first_avail) {
+ if (!ps->got_a_new_node && (node->first_avail + size < node->endp)) {
*node->ref = node->next;
node->next->ref = node->ref;