Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
33766a8
)
Tweaked a variable and a label to make them less confusing.
author
Wayne Davison
<wayned@samba.org>
Tue, 29 May 2007 02:47:23 +0000
(
02:47
+0000)
committer
Wayne Davison
<wayned@samba.org>
Tue, 29 May 2007 02:47:23 +0000
(
02:47
+0000)
lib/pool_alloc.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/pool_alloc.c
b/lib/pool_alloc.c
index
fd9c239
..
bc33003
100644
(file)
--- a/
lib/pool_alloc.c
+++ b/
lib/pool_alloc.c
@@
-90,7
+90,7
@@
pool_destroy(alloc_pool_t p)
}
void *
}
void *
-pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
+pool_alloc(alloc_pool_t p, size_t len, const char *bomb
_msg
)
{
struct alloc_pool *pool = (struct alloc_pool *) p;
if (!pool)
{
struct alloc_pool *pool = (struct alloc_pool *) p;
if (!pool)
@@
-102,7
+102,7
@@
pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
len += pool->quantum - len % pool->quantum;
if (len > pool->size)
len += pool->quantum - len % pool->quantum;
if (len > pool->size)
- goto bomb;
+ goto bomb
_out
;
if (!pool->live || len > pool->live->free) {
void *start;
if (!pool->live || len > pool->live->free) {
void *start;
@@
-125,7
+125,7
@@
pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
asize += sizeof (struct pool_extent);
if (!(start = new_array(char, asize)))
asize += sizeof (struct pool_extent);
if (!(start = new_array(char, asize)))
- goto bomb;
+ goto bomb
_out
;
if (pool->flags & POOL_CLEAR)
memset(start, 0, free);
if (pool->flags & POOL_CLEAR)
memset(start, 0, free);
@@
-133,7
+133,7
@@
pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
if (pool->flags & POOL_APPEND)
ext = PTR_ADD(start, free);
else if (!(ext = new(struct pool_extent)))
if (pool->flags & POOL_APPEND)
ext = PTR_ADD(start, free);
else if (!(ext = new(struct pool_extent)))
- goto bomb;
+ goto bomb
_out
;
if (pool->flags & POOL_QALIGN && pool->quantum > 1
&& (skew = (size_t)PTR_ADD(start, free) % pool->quantum)) {
bound += skew;
if (pool->flags & POOL_QALIGN && pool->quantum > 1
&& (skew = (size_t)PTR_ADD(start, free) % pool->quantum)) {
bound += skew;
@@
-155,9
+155,9
@@
pool_alloc(alloc_pool_t p, size_t len, const char *bomb)
return PTR_ADD(pool->live->start, pool->live->free);
return PTR_ADD(pool->live->start, pool->live->free);
-
bomb
:
+
bomb_out
:
if (pool->bomb)
if (pool->bomb)
- (*pool->bomb)(bomb);
+ (*pool->bomb)(bomb
_msg
);
return NULL;
}
return NULL;
}