return NULL;
len = strlen(src);
- if (((!empty) ? len : true) && (ptr = (char*)stat_mem_allocate(len + 1, line, file, NULL))) {
+ if (((!empty) ? len : true) && (ptr = (char*)stat_mem_allocate(len + 1, line, file, "strdup"))) {
memcpy(ptr, src, len);
ptr[len] = '\0';
}
*/
#if 1
#define GMQCC_ROTL32(X, R) (((X) << (R)) | ((X) >> (32 - (R))))
-GMQCC_INLINE size_t util_hthash(hash_table_t *ht, const char *key) {
+size_t util_hthash(hash_table_t *ht, const char *key) {
const unsigned char *data = (const unsigned char *)key;
const size_t len = strlen(key);
const size_t block = len / 4;
* information.
*/
static void stat_dump_mem_contents(stat_mem_block_t *block, uint16_t cols) {
- unsigned char *buffer = mem_a(cols);
+ unsigned char *buffer = (unsigned char *)mem_a(cols);
unsigned char *memory = (unsigned char *)(block + 1);
size_t i;
for (info = stat_mem_block_root; info; info = info->next) {
/* we need access to the block */
VALGRIND_MAKE_MEM_DEFINED(info, sizeof(stat_mem_block_t));
- con_out("lost: %u (bytes) at %s:%u %s\n",
+ con_out("lost: %u (bytes) at %s:%u from expression `%s`\n",
info->size,
info->file,
info->line,