Remove alloc_clear

Use `xcalloc` instead.
Inline `alloc_tv` and `alloc_string_tv` in eval.c
This commit is contained in:
John Schmidt
2014-04-22 11:35:11 +02:00
committed by Thiago de Arruda
parent c70a526a5d
commit 4e1b364a3e
16 changed files with 59 additions and 127 deletions

View File

@@ -53,14 +53,6 @@ char_u *alloc(unsigned size)
return lalloc((long_u)size, TRUE);
}
/*
* Allocate memory and set all bytes to zero.
*/
char_u *alloc_clear(unsigned size)
{
return (char_u *)xcalloc(1, (size_t)size);
}
/// Try to free memory. Used when trying to recover from out of memory errors.
/// @see {xmalloc}
static void try_to_free_memory()