aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 4e35dd481f..673205f08f 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -443,8 +443,9 @@ void ml_setname(buf_T *buf)
#ifdef HAVE_FD_CLOEXEC
{
int fdflags = fcntl(mfp->mf_fd, F_GETFD);
- if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
- fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
+ if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) {
+ (void)fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
+ }
}
#endif
}
@@ -1358,7 +1359,7 @@ recover_names (
if (*dirp == NUL && file_count + num_files == 0 && fname != NULL) {
char_u *swapname = (char_u *)modname((char *)fname_res, ".swp", TRUE);
if (swapname != NULL) {
- if (os_file_exists(swapname)) {
+ if (os_path_exists(swapname)) {
files = xmalloc(sizeof(char_u *));
files[0] = swapname;
swapname = NULL;
@@ -3425,11 +3426,11 @@ static char *findswapname(buf_T *buf, char **dirp, char *old_fname,
break;
}
- /* If the file was deleted this fname can be used. */
- if (!os_file_exists((char_u *) fname))
+ // If the file was deleted this fname can be used.
+ if (!os_path_exists((char_u *)fname)) {
break;
- } else
- {
+ }
+ } else {
MSG_PUTS("\n");
if (msg_silent == 0)
/* call wait_return() later */