summaryrefslogtreecommitdiff
path: root/memory
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2002-09-29 16:21:52 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2002-09-29 16:21:52 +0000
commit4f96f7bbd0b7b9dd6421c0861d657818500b809a (patch)
tree9b341ea41a2662b0d38f8b82fef9cdb33c45ac9f /memory
parent9f6bd0beab9c40e5ed70701b71ee1a151c7a4c37 (diff)
downloadapr-4f96f7bbd0b7b9dd6421c0861d657818500b809a.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63887 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory')
-rw-r--r--memory/unix/apr_pools.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 059af143a..9fe5bcc17 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -612,7 +612,7 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t size)
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 @@ APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t size)
}
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 @@ static int psprintf_flush(apr_vformatter_buff_t *vbuff)
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;