Merge #708 'Remove NULL/non-NULL tests after vim_str(n)save'

- replace alloc with xmalloc
This commit is contained in:
Justin M. Keyes
2014-05-22 12:50:59 -04:00
55 changed files with 937 additions and 1643 deletions

View File

@@ -43,14 +43,6 @@
static void try_to_free_memory();
/*
* Note: if unsigned is 16 bits we can only allocate up to 64K with alloc().
*/
char_u *alloc(unsigned size)
{
return xmalloc(size);
}
/// Try to free memory. Used when trying to recover from out of memory errors.
/// @see {xmalloc}
static void try_to_free_memory()
@@ -191,7 +183,7 @@ char *xstpncpy(char *restrict dst, const char *restrict src, size_t maxlen)
}
}
char * xstrdup(const char *str)
char *xstrdup(const char *str)
{
char *ret = strdup(str);