aboutsummaryrefslogtreecommitdiff
path: root/src/undo.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2014-04-19 02:12:47 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-04-24 10:31:31 -0300
commit42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876 (patch)
tree8c056bd42ec55f2103d65af680a54bd55dc71d7f /src/undo.c
parent4b6b9117b3e8b9b624c354a703f01f0980c60946 (diff)
downloadrneovim-42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876.tar.gz
rneovim-42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876.tar.bz2
rneovim-42f1bd9b2228aaca4fb8a5597a3b5774f7ef6876.zip
No OOM error condition in ga_concat_strings(), concat_fnames(), concat_str()
- xmallocz() is not static anymore. There are many use cases for this function in the codebase and we should start using it. - Simpler types in ga_concat_strings()
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/undo.c b/src/undo.c
index e95a34cbd1..91add9e3dd 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -721,11 +721,11 @@ char_u *u_get_undo_file_name(char_u *buf_ffname, int reading)
}
}
- /* When reading check if the file exists. */
- if (undo_file_name != NULL && (!reading
- || mch_stat((char *)undo_file_name,
- &st) >= 0))
+ // When reading check if the file exists.
+ if (undo_file_name != NULL &&
+ (!reading || mch_stat((char *)undo_file_name, &st) >= 0)) {
break;
+ }
vim_free(undo_file_name);
undo_file_name = NULL;
}