From a80d7e86c1f088c5b68d8e8929cc72a0d9680f76 Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Thu, 8 May 2014 21:34:46 -0300 Subject: Remove NULL/non-NULL tests after calls to vim_str(n)save() --- src/nvim/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/memory.c') diff --git a/src/nvim/memory.c b/src/nvim/memory.c index b39c113f99..b609232727 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -192,7 +192,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); -- cgit From 21784aeb005e78f04f4c1d398bc486be0a65248e Mon Sep 17 00:00:00 2001 From: Felipe Oliveira Carvalho Date: Fri, 9 May 2014 03:30:26 -0300 Subject: Replace alloc() with xmalloc() and remove immediate OOM checks --- src/nvim/memory.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/nvim/memory.c') diff --git a/src/nvim/memory.c b/src/nvim/memory.c index b609232727..2b7b823e6e 100644 --- a/src/nvim/memory.c +++ b/src/nvim/memory.c @@ -44,14 +44,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() -- cgit