diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-05-12 14:18:10 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-05-19 14:50:25 -0300 |
commit | 11cae8ec58575213b4f29043a191dcdde766eb0a (patch) | |
tree | d30dfc9d1009faf8e854c1635f07ae45e1c5a875 | |
parent | a2f6a53b68d73cb585dcb67ea19579d446810176 (diff) | |
download | rneovim-11cae8ec58575213b4f29043a191dcdde766eb0a.tar.gz rneovim-11cae8ec58575213b4f29043a191dcdde766eb0a.tar.bz2 rneovim-11cae8ec58575213b4f29043a191dcdde766eb0a.zip |
Remove OOM checks: backslash_halve_save()
-rw-r--r-- | src/nvim/charset.c | 1 | ||||
-rw-r--r-- | src/nvim/ex_getln.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/charset.c b/src/nvim/charset.c index 7c8284a891..ae5da557d5 100644 --- a/src/nvim/charset.c +++ b/src/nvim/charset.c @@ -1910,6 +1910,7 @@ 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); backslash_halve(res); return res; diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index ed6f8fc964..b507116ac3 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -3213,8 +3213,7 @@ static int showmatches(expand_T *xp, int wildmenu) exp_path = expand_env_save_opt(files_found[k], TRUE); halved_slash = backslash_halve_save( exp_path != NULL ? exp_path : files_found[k]); - j = os_isdir(halved_slash != NULL ? halved_slash - : files_found[k]); + j = os_isdir(halved_slash); free(exp_path); free(halved_slash); } else |