forked from osmocom/wireshark
Trivial tweaks to clean up cppcheck warnings.
svn path=/trunk/; revision=48435
This commit is contained in:
parent
b7b30a7cdf
commit
8a874b238e
|
@ -178,7 +178,7 @@ wmem_block_debug_chunk_chain(wmem_block_chunk_t *chunk)
|
|||
printf("VERIFYING CHUNK CHAIN\n");
|
||||
g_assert(chunk->prev == 0);
|
||||
|
||||
while (chunk) {
|
||||
do {
|
||||
total_len += chunk->len;
|
||||
|
||||
if (WMEM_CHUNK_NEXT(chunk)) {
|
||||
|
@ -186,7 +186,7 @@ wmem_block_debug_chunk_chain(wmem_block_chunk_t *chunk)
|
|||
}
|
||||
|
||||
chunk = WMEM_CHUNK_NEXT(chunk);
|
||||
}
|
||||
} while (chunk);
|
||||
|
||||
g_assert(total_len == WMEM_BLOCK_SIZE);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ wmem_simple_alloc(void *private_data, const size_t size)
|
|||
static void
|
||||
wmem_simple_free(void *private_data, void *ptr)
|
||||
{
|
||||
gboolean removed = FALSE;
|
||||
gboolean removed;
|
||||
wmem_simple_allocator_t *allocator;
|
||||
|
||||
allocator = (wmem_simple_allocator_t*) private_data;
|
||||
|
@ -66,6 +66,7 @@ wmem_simple_free(void *private_data, void *ptr)
|
|||
/* remove() takes care of calling g_free() for us since we set up the
|
||||
* hash table with g_hash_table_new_full() */
|
||||
removed = g_hash_table_remove(allocator->block_table, ptr);
|
||||
|
||||
g_assert(removed);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,9 @@ wmem_alloc0(wmem_allocator_t *allocator, const size_t size)
|
|||
|
||||
buf = wmem_alloc(allocator, size);
|
||||
|
||||
return memset(buf, 0, size);
|
||||
memset(buf, 0, size);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue