mirror of
https://github.com/neovim/neovim.git
synced 2026-08-24 08:01:53 +00:00
Merge #708 'Remove NULL/non-NULL tests after vim_str(n)save'
- replace alloc with xmalloc
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user