Remove OOM checks: backslash_halve_save()

This commit is contained in:
Felipe Oliveira Carvalho 2014-05-12 14:18:10 -03:00
parent a2f6a53b68
commit 11cae8ec58
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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