aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/charset.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-05-22 12:50:59 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-05-22 13:00:51 -0400
commite2e47803bdfd5fb40e3dbc9cdf798bb27d306c72 (patch)
tree6ff1b06b5d5fd6d3260f3a778c33cfaf03f0c295 /src/nvim/charset.c
parent0aa8b5828cc0674894681841f40c3c05bfd2f07b (diff)
parente303a11ebfc352860cce73184ece692ab4d0f01c (diff)
downloadrneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.tar.gz
rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.tar.bz2
rneovim-e2e47803bdfd5fb40e3dbc9cdf798bb27d306c72.zip
Merge #708 'Remove NULL/non-NULL tests after vim_str(n)save'
- replace alloc with xmalloc
Diffstat (limited to 'src/nvim/charset.c')
-rw-r--r--src/nvim/charset.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c
index 6618a7c22d..ae5da557d5 100644
--- a/src/nvim/charset.c
+++ b/src/nvim/charset.c
@@ -1910,10 +1910,8 @@ void backslash_halve(char_u *p)
/// @return String with the number of backslashes halved.
char_u* backslash_halve_save(char_u *p)
{
+ // TODO(philix): simplify and improve backslash_halve_save algorithm
char_u *res = vim_strsave(p);
- if (res == NULL) {
- return p;
- }
backslash_halve(res);
return res;
}