summaryrefslogtreecommitdiff
path: root/oldpool.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-12-26 17:36:18 +0000
committerDarkvater <darkvater@openttd.org>2006-12-26 17:36:18 +0000
commit073e0eb3c9148d6dd8b2c9ce788843b8180351cb (patch)
tree8dae47833ded5c522ac7a89f69f10fc0c2530e90 /oldpool.c
parent2e0bbe540383c96f4356dd75e70bb1fa5c8e95be (diff)
downloadopenttd-073e0eb3c9148d6dd8b2c9ce788843b8180351cb.tar.xz
(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to
use in debug.h. grfmsg() is now used as a specific debug-function for grf.
Diffstat (limited to 'oldpool.c')
-rw-r--r--oldpool.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/oldpool.c b/oldpool.c
index e857907f1..2b2d188e8 100644
--- a/oldpool.c
+++ b/oldpool.c
@@ -13,7 +13,7 @@ void CleanPool(OldMemoryPool *pool)
{
uint i;
- DEBUG(misc, 4)("[Pool] (%s) Cleaning pool..", pool->name);
+ DEBUG(misc, 4, "[Pool] (%s) cleaning pool..", pool->name);
/* Free all blocks */
for (i = 0; i < pool->current_blocks; i++) {
@@ -46,12 +46,11 @@ bool AddBlockToPool(OldMemoryPool *pool)
pool->total_items = (pool->current_blocks + 1) * (1 << pool->block_size_bits);
- DEBUG(misc, 4)("[Pool] (%s) Increasing size of pool to %d items (%d bytes)", pool->name, pool->total_items, pool->total_items * pool->item_size);
+ DEBUG(misc, 4, "[Pool] (%s) increasing size of pool to %d items (%d bytes)", pool->name, pool->total_items, pool->total_items * pool->item_size);
/* Increase the poolsize */
pool->blocks = realloc(pool->blocks, sizeof(pool->blocks[0]) * (pool->current_blocks + 1));
- if (pool->blocks == NULL)
- error("Pool: (%s) could not allocate memory for blocks", pool->name);
+ if (pool->blocks == NULL) error("Pool: (%s) could not allocate memory for blocks", pool->name);
/* Allocate memory to the new block item */
pool->blocks[pool->current_blocks] = malloc(pool->item_size * (1 << pool->block_size_bits));