diff options
author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-06-05 23:20:02 -0300 |
---|---|---|
committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2014-06-16 01:40:29 -0300 |
commit | f099809e670106aff55c41c7b19c0bc81e38aa7b (patch) | |
tree | b1b62c66c1c0f7e589c8afb2be98ac432585b6c2 | |
parent | 238fa72884d0d3bcd268b0039ca4c3f62be03f15 (diff) | |
download | rneovim-f099809e670106aff55c41c7b19c0bc81e38aa7b.tar.gz rneovim-f099809e670106aff55c41c7b19c0bc81e38aa7b.tar.bz2 rneovim-f099809e670106aff55c41c7b19c0bc81e38aa7b.zip |
Refator return logic in ses_put_fname()
-rw-r--r-- | src/nvim/ex_docmd.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 6e02c741eb..701a51799f 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -8554,13 +8554,9 @@ static int ses_put_fname(FILE *fd, char_u *name, unsigned *flagp) free(sname); /* write the result */ - if (fputs((char *)p, fd) < 0) { - free(p); - return FAIL; - } - + bool retval = fputs((char *)p, fd) < 0 ? FAIL : OK; free(p); - return OK; + return retval; } /* |