diff options
author | Bill Meier <wmeier@newsguy.com> | 2013-03-20 01:18:10 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2013-03-20 01:18:10 +0000 |
commit | 0df5a9390d41149dfc87440d72e7669ba96748ec (patch) | |
tree | 8accf4dfc301adfc679ed7f21b7123cb4b2c55f9 /epan/wmem/wmem_allocator_strict.c | |
parent | a43e5a7eb9fe1ad5a89e7cfd556a791a50fefee7 (diff) | |
download | wireshark-0df5a9390d41149dfc87440d72e7669ba96748ec.tar.gz |
From beroset:
remove C++ incompatibilities
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397
svn path=/trunk/; revision=48438
Diffstat (limited to 'epan/wmem/wmem_allocator_strict.c')
-rw-r--r-- | epan/wmem/wmem_allocator_strict.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/wmem/wmem_allocator_strict.c b/epan/wmem/wmem_allocator_strict.c index 783916bdbb..45ba002de4 100644 --- a/epan/wmem/wmem_allocator_strict.c +++ b/epan/wmem/wmem_allocator_strict.c @@ -77,7 +77,7 @@ static void wmem_strict_ghash_check_canaries(gpointer key _U_, gpointer value, gpointer user_data _U_) { - wmem_strict_block_check_canaries(value); + wmem_strict_block_check_canaries((wmem_strict_allocator_block_t *)value); } static void @@ -93,7 +93,7 @@ wmem_strict_block_free(wmem_strict_allocator_block_t *block) static void wmem_strict_ghash_block_free(gpointer data) { - wmem_strict_block_free(data); + wmem_strict_block_free((wmem_strict_allocator_block_t *)data); } static wmem_strict_allocator_block_t * @@ -104,7 +104,7 @@ wmem_strict_block_new(const size_t size) block = g_slice_new(wmem_strict_allocator_block_t); block->data_len = size; - block->leading_canary = g_malloc(block->data_len + (2 * WMEM_CANARY_SIZE)); + block->leading_canary = (guint8 *)g_malloc(block->data_len + (2 * WMEM_CANARY_SIZE)); block->real_data = block->leading_canary + WMEM_CANARY_SIZE; block->trailing_canary = block->real_data + block->data_len; @@ -143,7 +143,7 @@ wmem_strict_free(void *private_data, void *ptr) allocator = (wmem_strict_allocator_t*) private_data; - block = g_hash_table_lookup(allocator->block_table, ptr); + block = (wmem_strict_allocator_block_t *)g_hash_table_lookup(allocator->block_table, ptr); g_assert(block); @@ -162,7 +162,7 @@ wmem_strict_realloc(void *private_data, void *ptr, const size_t size) allocator = (wmem_strict_allocator_t*) private_data; /* retrieve and check the old block */ - block = g_hash_table_lookup(allocator->block_table, ptr); + block = (wmem_strict_allocator_block_t *)g_hash_table_lookup(allocator->block_table, ptr); g_assert(block); wmem_strict_block_check_canaries(block); |